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 <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
AkiraXue authored and MylesBorins committed Aug 16, 2017
1 parent b64fe2e commit a71e23a
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 @@ -5,7 +5,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 a71e23a

Please sign in to comment.