Skip to content

Commit 94ff591

Browse files
AkiraXueMylesBorins
authored andcommitted
test: use regluar expression in vm test
update test/parallel/test-vm-create-context-arg.js in line 27 to change `TypeError` to the regular expression with the `/^TypeError: sandbox must be an object$/`. PR-URL: #14266 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 8b945e7 commit 94ff591

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-vm-create-context-arg.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.createContext('string is not supported');
8-
}, TypeError);
8+
}, /^TypeError: sandbox must be an object$/);
99

1010
assert.doesNotThrow(function() {
1111
vm.createContext({ a: 1 });

0 commit comments

Comments
 (0)