Skip to content

Commit

Permalink
fix(test): try fixing tests on Windows (maybe)
Browse files Browse the repository at this point in the history
  • Loading branch information
paambaati authored Jun 4, 2024
1 parent 80e87d3 commit 47793be
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { platform } from 'node:os';
import { pathToFileURL } from 'node:url';
import { assert } from '@japa/assert';
import { configure, processCLIArgs, run } from '@japa/runner';

Expand All @@ -14,6 +16,11 @@ configure({
},
],
plugins: [assert()],
importer: (filePath) => {
return platform() === 'win32'
? import(pathToFileURL(filePath.toString()).href)
: import(filePath.toString());
},
});

await run();

0 comments on commit 47793be

Please sign in to comment.