Skip to content

Commit dc53f53

Browse files
committed
fix windows test
Signed-off-by: karthik2804 <karthik.ganeshram@fermyon.com>
1 parent dbda420 commit dc53f53

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/cases/missing-export/test.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { strictEqual } from 'node:assert';
1+
import { match } from 'node:assert';
22

3+
// use match instead of strictEqual to enable testing between linux and windows
4+
// Windows errors prefix the error with file path
35
export function err(e) {
4-
strictEqual(e.message, `Unable to extract expected exports list
5-
Error: "missing-export.js" does not export a "expected" function as expected by the world.
6-
Try defining it:
7-
export function expected() {};`);
6+
match(e.message, /Error: "missing-export.js" does not export a "expected" function/);
7+
match(e.message, /Try defining it:/);
8+
match(e.message, /export function expected\(\) {};/);
89
}

0 commit comments

Comments
 (0)