Skip to content

Commit

Permalink
test: add regex check in test-vm-is-context
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Jeyanthinath authored and lpinca committed May 5, 2017
1 parent 53c88fa commit bc05436
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-vm-is-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const vm = require('vm');

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

assert.strictEqual(vm.isContext({}), false);
assert.strictEqual(vm.isContext([]), false);
Expand Down

0 comments on commit bc05436

Please sign in to comment.