Skip to content

Commit 38deeb8

Browse files
Update test_utils.ts
1 parent 8245352 commit 38deeb8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/test_utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export interface DenoJson {
1818
* So we need to deifnefpr test context.
1919
*/
2020
if (isMainThread && "register" in module) {
21-
const __dirname = path.dirname(new URL(import.meta.url).pathname);
21+
const __dirname = path.dirname(
22+
module.createRequire(import.meta.url).resolve("./test_utils.ts"),
23+
);
2224
globalThis.__dirname = __dirname;
2325
}
2426

0 commit comments

Comments
 (0)