Skip to content

Commit bc05436

Browse files
Jeyanthinathlpinca
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 53c88fa commit bc05436

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const vm = require('vm');
2626

2727
assert.throws(function(){
2828
vm.isContext('string is not supported');
29-
},TypeError);
29+
},/^TypeError:sandboxmustbeanobject$/);
3030

3131
assert.strictEqual(vm.isContext({}),false);
3232
assert.strictEqual(vm.isContext([]),false);

0 commit comments

Comments
(0)