Browse Source

test: use regluar expression in vm test

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: https://github.com/nodejs/node/pull/14266
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v6
akira.xue 8 years ago
committed by Rich Trott
parent
commit
e8170f2246
  1. 2
      test/parallel/test-vm-create-context-arg.js

2
test/parallel/test-vm-create-context-arg.js

@ -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 });

Loading…
Cancel
Save