repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

test(overkill): resolve extension paths on windows

0f4d7d98fececbf3bd59cb5a7f32c03dfdfd5430

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (2)

extensions/overkill/__tests__/acceptance.test.ts

Modified
9 9 } from "node:fs/promises";
10 10 import { tmpdir } from "node:os";
11 11 import { dirname, join, relative } from "node:path";
12 +import { fileURLToPath } from "node:url";
12 13 import {
13 14 createTestSession,
14 15 type TestSession,
20 21 installModeAcceptanceSeam,
21 22 } from "../index.ts";
23 -const extensionPath = new URL("../index.ts", import.meta.url).pathname;
24 +const extensionPath = fileURLToPath(new URL("../index.ts", import.meta.url));
24 25 const temporaryPaths: string[] = [];
25 26 let session: TestSession | undefined;
26 27 let removeSeam: (() => void) | undefined;

extensions/overkill/__tests__/aftermath-acceptance.test.ts

Modified
10 10 } from "node:fs/promises";
11 11 import { tmpdir } from "node:os";
12 12 import { dirname, join, relative } from "node:path";
13 +import { fileURLToPath } from "node:url";
13 14 import {
14 15 type ExtensionCommandContext,
15 16 SessionManager,
31 32 } from "../lib/aftermath-mining.ts";
32 33 import { persistFrozenTasks, readFrozenTasks } from "../lib/aftermath-state.ts";
34 -const extensionPath = new URL("../index.ts", import.meta.url).pathname;
35 +const extensionPath = fileURLToPath(new URL("../index.ts", import.meta.url));
35 36 const temporaryPaths: string[] = [];
36 37 let session: TestSession | undefined;
37 38 let removeSeam: (() => void) | undefined;