We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dbda420 commit dc53f53Copy full SHA for dc53f53
test/cases/missing-export/test.js
@@ -1,8 +1,9 @@
1
-import { strictEqual } from 'node:assert';
+import { match } from 'node:assert';
2
3
+// use match instead of strictEqual to enable testing between linux and windows
4
+// Windows errors prefix the error with file path
5
export function err(e) {
- strictEqual(e.message, `Unable to extract expected exports list
-Error: "missing-export.js" does not export a "expected" function as expected by the world.
6
- Try defining it:
7
- export function expected() {};`);
+ match(e.message, /Error: "missing-export.js" does not export a "expected" function/);
+ match(e.message, /Try defining it:/);
8
+ match(e.message, /export function expected\(\) {};/);
9
}
0 commit comments