diff --git a/test/parallel/test-vm-create-context-arg.js b/test/parallel/test-vm-create-context-arg.js index 87695b34ec8044..8675add90cfcc6 100644 --- a/test/parallel/test-vm-create-context-arg.js +++ b/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 });