Skip to content

Commit 57cd5da

Browse files
JakobJingleheimerGeoffreyBooth
authored andcommitted
!includes → doesNotMatch
1 parent 205306a commit 57cd5da

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/es-module/test-esm-loader-with-syntax-error.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { spawnPromisified } from '../common/index.mjs';
22
import { fileURL, path } from '../common/fixtures.mjs';
3-
import { match, ok, notStrictEqual } from 'node:assert';
3+
import { doesNotMatch, match, notStrictEqual } from 'node:assert';
44
import { execPath } from 'node:process';
55
import { describe, it } from 'node:test';
66

@@ -14,8 +14,10 @@ describe('ESM: loader with syntax error', { concurrency: true }, () => {
1414
path('print-error-message.js'),
1515
]);
1616

17+
console.log(stderr);
18+
1719
match(stderr, /SyntaxError \[Error\]:/);
18-
ok(!stderr.includes('Bad command or file name'));
20+
doesNotMatch(stderr, /Bad command or file name/);
1921
notStrictEqual(code, 0);
2022
});
2123
});

0 commit comments

Comments
 (0)