Skip to content

Commit 7dd3c8a

Browse files
JiaHerr Teeaddaleax
JiaHerr Tee
authored andcommitted
test: add url type check in Module options
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 <[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]>
1 parent be9777c commit 7dd3c8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-vm-module-errors.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async function checkArgType() {
4444
});
4545

4646
for (const invalidOptions of [
47-
0, 1, null, true, 'str', () => {}, Symbol.iterator
47+
0, 1, null, true, 'str', () => {}, { url: 0 }, Symbol.iterator
4848
]) {
4949
common.expectsError(() => {
5050
new Module('', invalidOptions);

0 commit comments

Comments
 (0)