diff --git a/test/parallel/test-vm-create-context-arg.js b/test/parallel/test-vm-create-context-arg.js index 91bbbc3b7793bc..41b1f8993957fe 100644 --- a/test/parallel/test-vm-create-context-arg.js +++ b/test/parallel/test-vm-create-context-arg.js @@ -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 });