From d187a1ed2d5d51860ef1a6115f8e30e55264144c Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Mon, 16 Mar 2026 11:46:04 -0600 Subject: [PATCH] fix: use file:// URL for dynamic imports in smoke test (Windows compat) On Windows, raw paths like D:\... are interpreted as protocol "d:" by the ESM loader. Convert via pathToFileURL before dynamic import. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/tests/extension-smoke.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/extension-smoke.test.ts b/src/tests/extension-smoke.test.ts index 1177a09ce..f8b9f4f37 100644 --- a/src/tests/extension-smoke.test.ts +++ b/src/tests/extension-smoke.test.ts @@ -14,7 +14,7 @@ import test from "node:test"; import assert from "node:assert/strict"; import { join } from "node:path"; -import { fileURLToPath } from "node:url"; +import { fileURLToPath, pathToFileURL } from "node:url"; const projectRoot = join(fileURLToPath(import.meta.url), "..", "..", ".."); const extensionsDir = join(projectRoot, "src", "resources", "extensions"); @@ -47,7 +47,7 @@ test("all bundled extensions can be imported without throwing", async () => { } try { - await import(entryPath); + await import(pathToFileURL(entryPath).href); } catch (err) { failures.push({ path: relPath,