Skip to content

Commit fff0e39

Browse files
JeyanthinathMylesBorins
authored andcommitted
test: add regex check in test-vm-is-context
Use a regex to validate the error message. PR-URL: #12785 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 95d13d5 commit fff0e39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-vm-is-context.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const vm = require('vm');
55

66
assert.throws(function() {
77
vm.isContext('string is not supported');
8-
}, TypeError);
8+
}, /^TypeError: sandbox must be an object$/);
99

1010
assert.strictEqual(vm.isContext({}), false);
1111
assert.strictEqual(vm.isContext([]), false);

0 commit comments

Comments
 (0)