diff --git a/artifacts/api-server/src/routes/testkit.ts b/artifacts/api-server/src/routes/testkit.ts index 0ec19e6..9683b35 100644 --- a/artifacts/api-server/src/routes/testkit.ts +++ b/artifacts/api-server/src/routes/testkit.ts @@ -1,7 +1,6 @@ import { Router, type Request, type Response } from "express"; import { readFileSync } from "fs"; -import { resolve, dirname } from "path"; -import { fileURLToPath } from "url"; +import { resolve } from "path"; const router = Router(); @@ -1105,8 +1104,7 @@ if [[ "\$FAIL" -gt 0 ]]; then exit 1; fi * Returns TIMMY_TEST_PLAN.md verbatim as text/markdown. * Path resolves from the project root regardless of cwd. */ -const _dirname = dirname(fileURLToPath(import.meta.url)); -const PLAN_PATH = resolve(_dirname, "../../../../TIMMY_TEST_PLAN.md"); +const PLAN_PATH = resolve(process.cwd(), "TIMMY_TEST_PLAN.md"); router.get("/testkit/plan", (_req: Request, res: Response) => { let content: string;