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 <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
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)