feat(FN-3903): merge duplicate createRouteContext mock in plugin-routes tes
Cleans up a duplicate `createRouteContext` mock in the plugin-routes test file, reducing 9 lines of dead code. Fusion-Task-Id: FN-3903
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import { once } from "node:events";
|
||||
import type { Server } from "node:http";
|
||||
import type { AddressInfo } from "node:net";
|
||||
import { TaskStore } from "@fusion/core";
|
||||
import { createServer } from "@fusion/dashboard";
|
||||
|
||||
export type RuntimeSource = "embedded-local" | "external-cli" | "none";
|
||||
export type RuntimeState = "stopped" | "starting" | "running" | "error";
|
||||
@@ -36,10 +34,12 @@ export interface LocalRuntimeManagerOptions {
|
||||
}
|
||||
|
||||
async function createStoreDefault(rootDir: string): Promise<TaskStoreLike> {
|
||||
const { TaskStore } = await import("@fusion/core");
|
||||
return new TaskStore(rootDir) as TaskStoreLike;
|
||||
}
|
||||
|
||||
async function createDashboardServerDefault(store: TaskStoreLike): Promise<Server> {
|
||||
const { createServer } = await import("@fusion/dashboard");
|
||||
return createServer(store).listen(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user