Skip to content

Commit

Permalink
test: use regluar expression in vm test
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
AkiraXue authored and addaleax committed Jul 18, 2017
1 parent a338b94 commit e37510a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-vm-create-context-arg.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.createContext('string is not supported');
}, TypeError);
}, /^TypeError: sandbox must be an object$/);

assert.doesNotThrow(function() {
vm.createContext({ a: 1 });
Expand Down

0 comments on commit e37510a

Please sign in to comment.