Skip to content

Commit 47793be

Browse files
authoredJun 4, 2024··
fix(test): try fixing tests on Windows (maybe)
1 parent 80e87d3 commit 47793be

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

Diff for: ‎bin/test.ts

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { platform } from 'node:os';
2+
import { pathToFileURL } from 'node:url';
13
import { assert } from '@japa/assert';
24
import { configure, processCLIArgs, run } from '@japa/runner';
35

@@ -14,6 +16,11 @@ configure({
1416
},
1517
],
1618
plugins: [assert()],
19+
importer: (filePath) => {
20+
return platform() === 'win32'
21+
? import(pathToFileURL(filePath.toString()).href)
22+
: import(filePath.toString());
23+
},
1724
});
1825

1926
await run();

0 commit comments

Comments
 (0)
Please sign in to comment.