From e8170f2246717cd8171c450ba11ae04934cf7dd9 Mon Sep 17 00:00:00 2001 From: "akira.xue" Date: Sun, 16 Jul 2017 15:10:37 +0800 Subject: [PATCH] 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 Reviewed-By: Gibson Fahnestock Reviewed-By: Colin Ihrig --- test/parallel/test-vm-create-context-arg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 });