Skip to content

Commit e37510a

Browse files
AkiraXueaddaleax
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 a338b94 commit e37510a

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
@@ -26,7 +26,7 @@ const vm = require('vm');
2626

2727
assert.throws(function() {
2828
vm.createContext('string is not supported');
29-
}, TypeError);
29+
}, /^TypeError: sandbox must be an object$/);
3030

3131
assert.doesNotThrow(function() {
3232
vm.createContext({ a: 1 });

0 commit comments

Comments
 (0)