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