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: #18664
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
JiaHerr Tee authored and devsnek committed Feb 10, 2018
1 parent 523a155 commit edffad0
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 edffad0

Please sign in to comment.