diff --git a/orchestrate/skills/orchestrate/scripts/__tests__/comment-cli.test.ts b/orchestrate/skills/orchestrate/scripts/__tests__/comment-cli.test.ts index e3c6954d4..f8c736a92 100644 --- a/orchestrate/skills/orchestrate/scripts/__tests__/comment-cli.test.ts +++ b/orchestrate/skills/orchestrate/scripts/__tests__/comment-cli.test.ts @@ -2,14 +2,15 @@ import { describe, expect, test } from "bun:test"; import { spawnSync } from "node:child_process"; import { mkdtempSync, rmSync, writeFileSync } from "node:fs"; import { tmpdir } from "node:os"; -import { join } from "node:path"; +import { dirname, join } from "node:path"; +import { fileURLToPath } from "node:url"; import { loadKickoffThreadTsOrBail } from "../cli/comments.ts"; const TEST_SLACK_CHANNEL = "C123TEST"; -const CLI_PATH = new URL("../cli.ts", import.meta.url).pathname; -const SCRIPTS_DIR = new URL("..", import.meta.url).pathname; +const CLI_PATH = fileURLToPath(new URL("../cli.ts", import.meta.url)); +const SCRIPTS_DIR = dirname(CLI_PATH); describe("comment CLI", () => { test("Refuses to post without --task or --thread-ts", () => { diff --git a/orchestrate/skills/orchestrate/scripts/__tests__/kickoff-dedupe.test.ts b/orchestrate/skills/orchestrate/scripts/__tests__/kickoff-dedupe.test.ts index 586c4aa39..81d12185e 100644 --- a/orchestrate/skills/orchestrate/scripts/__tests__/kickoff-dedupe.test.ts +++ b/orchestrate/skills/orchestrate/scripts/__tests__/kickoff-dedupe.test.ts @@ -1,7 +1,11 @@ import { describe, expect, test } from "bun:test"; import { spawnSync } from "node:child_process"; +import { dirname } from "node:path"; +import { fileURLToPath } from "node:url"; -const SCRIPTS_DIR = new URL("..", import.meta.url).pathname; +const SCRIPTS_DIR = dirname( + fileURLToPath(new URL("../cli.ts", import.meta.url)) +); import { findActiveRootPlanner, diff --git a/orchestrate/skills/orchestrate/scripts/__tests__/prompt-plan-validation.test.ts b/orchestrate/skills/orchestrate/scripts/__tests__/prompt-plan-validation.test.ts index 033abcb9e..c852dda11 100644 --- a/orchestrate/skills/orchestrate/scripts/__tests__/prompt-plan-validation.test.ts +++ b/orchestrate/skills/orchestrate/scripts/__tests__/prompt-plan-validation.test.ts @@ -3,12 +3,13 @@ import { spawnSync } from "node:child_process"; import { mkdtempSync, rmSync, writeFileSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; +import { fileURLToPath } from "node:url"; function runPromptWithPlan(plan: unknown): ReturnType { const workspace = mkdtempSync(join(tmpdir(), "orchestrate-plan-migration-")); writeFileSync(join(workspace, "plan.json"), JSON.stringify(plan, null, 2)); - const cliPath = new URL("../cli.ts", import.meta.url).pathname; + const cliPath = fileURLToPath(new URL("../cli.ts", import.meta.url)); try { return spawnSync( process.execPath,