From fff0e3993318a589c7564c006dd2d1941dba0731 Mon Sep 17 00:00:00 2001 From: jeyanthinath Date: Tue, 2 May 2017 14:55:10 +0530 Subject: [PATCH] test: add regex check in test-vm-is-context Use a regex to validate the error message. PR-URL: https://github.com/nodejs/node/pull/12785 Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- test/parallel/test-vm-is-context.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-vm-is-context.js b/test/parallel/test-vm-is-context.js index e58b896fccaa43..e8b220ed6c3d68 100644 --- a/test/parallel/test-vm-is-context.js +++ b/test/parallel/test-vm-is-context.js @@ -5,7 +5,7 @@ const vm = require('vm'); assert.throws(function() { vm.isContext('string is not supported'); -}, TypeError); +}, /^TypeError: sandbox must be an object$/); assert.strictEqual(vm.isContext({}), false); assert.strictEqual(vm.isContext([]), false);