Skip to content

Commit

Permalink
test: add url type check in Module options
Browse files Browse the repository at this point in the history
The code coverage in `root/internal/vm/Module.js` lacked test coverage
for the url options paramter. The test adds a check to ensure error
is thrown.

PR-URL: nodejs#18664
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
JiaHerr Tee authored and addaleax committed Feb 27, 2018
1 parent be9777c commit 7dd3c8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-vm-module-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async function checkArgType() {
});

for (const invalidOptions of [
0, 1, null, true, 'str', () => {}, Symbol.iterator
0, 1, null, true, 'str', () => {}, { url: 0 }, Symbol.iterator
]) {
common.expectsError(() => {
new Module('', invalidOptions);
Expand Down

0 comments on commit 7dd3c8a

Please sign in to comment.