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:
Fusion
2026-05-09 20:57:07 -07:00
committed by gsxdsm
parent 81243b762b
commit 3b5e04120d
2 changed files with 2 additions and 11 deletions

View File

@@ -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);
}