diff --git a/test/parallel/test-vm-run-in-new-context.js b/test/parallel/test-vm-run-in-new-context.js index 7b096ffc3fdc5f..3f8c632859db0f 100644 --- a/test/parallel/test-vm-run-in-new-context.js +++ b/test/parallel/test-vm-run-in-new-context.js @@ -17,7 +17,7 @@ assert.strictEqual('passed', result); console.error('thrown error'); assert.throws(function() { vm.runInNewContext('throw new Error(\'test\');'); -}); +}, /^Error: test$/); global.hello = 5; vm.runInNewContext('hello = 2');