From 7dd3c8af88c03c09970921df92d82dedb2391c4d Mon Sep 17 00:00:00 2001 From: JiaHerr Tee Date: Thu, 8 Feb 2018 18:38:38 -0500 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/18664 Reviewed-By: Ruben Bridgewater Reviewed-By: Colin Ihrig Reviewed-By: Gus Caplan Reviewed-By: Yuta Hiroto Reviewed-By: James M Snell --- test/parallel/test-vm-module-errors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-vm-module-errors.js b/test/parallel/test-vm-module-errors.js index 1c7e01cf30e51b..424d35e8aaf67a 100644 --- a/test/parallel/test-vm-module-errors.js +++ b/test/parallel/test-vm-module-errors.js @@ -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);