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>
This commit is contained in:
parent
bfae1feb38
commit
e8170f2246
@ -26,7 +26,7 @@ const vm = require('vm');
|
|||||||
|
|
||||||
assert.throws(function() {
|
assert.throws(function() {
|
||||||
vm.createContext('string is not supported');
|
vm.createContext('string is not supported');
|
||||||
}, TypeError);
|
}, /^TypeError: sandbox must be an object$/);
|
||||||
|
|
||||||
assert.doesNotThrow(function() {
|
assert.doesNotThrow(function() {
|
||||||
vm.createContext({ a: 1 });
|
vm.createContext({ a: 1 });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user