Skip to content

Commit 6242f1a

Browse files
JeyanthinathOlivier Martin
authored andcommitted
test: add regex check in test-vm-is-context
Use a regex to validate the error message. PR-URL: nodejs#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 4950185 commit 6242f1a

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: sandbox must be an object$/);
3030

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

0 commit comments

Comments
 (0)