Skip to content

Commit 0be7f8c

Browse files
Trottevanlucas
authored andcommitted
test: make test-require-json engine agnostic
Remove reliance on V8-specific error message in test-require-json. PR-URL: #16272 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 835ca63 commit 0be7f8c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/parallel/test-require-json.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ try {
2828
require(fixtures.path('invalid.json'));
2929
} catch (err) {
3030
assert.ok(
31-
/test[/\\]fixtures[/\\]invalid\.json: Unexpected string/.test(err.message),
32-
`require() json error should include path - currently: ${err.message}`
33-
);
31+
/test[/\\]fixtures[/\\]invalid\.json: /.test(err.message),
32+
`require() json error should include path: ${err.message}`);
3433
}

0 commit comments

Comments
 (0)