Skip to content

Commit 7bc6767

Browse files
fix(tests): import in fetch state fn
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
1 parent 79285fe commit 7bc6767

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/builtins/fetch.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import { URL } from "node:url";
12
import { createServer } from "node:net";
23

34
import { strictEqual, ok } from 'node:assert';
4-
import { getRandomPort } from "../util";
55

66
const FETCH_URL = 'http://localhost';
77

88
export const state = async () => {
9+
const { getRandomPort } = await import(new URL("../util", import.meta.url));
910
const port = await getRandomPort();
1011
return { port };
1112
};

0 commit comments

Comments
 (0)