From e37510a0c7d7668b79bd9278c646bd5134632a2c 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 });