fix tests failing because of new module ctx

This commit is contained in:
dswbx
2025-08-02 16:36:23 +02:00
parent ffbb61d58a
commit 104885ea5c
2 changed files with 3 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ describe("App", () => {
"guard", "guard",
"flags", "flags",
"logger", "logger",
"mcp",
"helper", "helper",
]); ]);
}, },

View File

@@ -8,6 +8,7 @@ import { EntityManager } from "data/entities/EntityManager";
import { Module, type ModuleBuildContext } from "modules/Module"; import { Module, type ModuleBuildContext } from "modules/Module";
import { getDummyConnection } from "../helper"; import { getDummyConnection } from "../helper";
import { ModuleHelper } from "modules/ModuleHelper"; import { ModuleHelper } from "modules/ModuleHelper";
import { McpServer } from "jsonv-ts/mcp";
export function makeCtx(overrides?: Partial<ModuleBuildContext>): ModuleBuildContext { export function makeCtx(overrides?: Partial<ModuleBuildContext>): ModuleBuildContext {
const { dummyConnection } = getDummyConnection(); const { dummyConnection } = getDummyConnection();
@@ -19,6 +20,7 @@ export function makeCtx(overrides?: Partial<ModuleBuildContext>): ModuleBuildCon
guard: new Guard(), guard: new Guard(),
flags: Module.ctx_flags, flags: Module.ctx_flags,
logger: new DebugLogger(false), logger: new DebugLogger(false),
mcp: new McpServer(),
...overrides, ...overrides,
}; };
return { return {