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) <noreply@anthropic.com>
This commit is contained in:
parent
40dd80a41e
commit
d187a1ed2d
1 changed files with 2 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue