From b3b36260bb99d455748a8509c9ffb2b5b76858c5 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Sun, 21 May 2017 23:09:00 -0700 Subject: [PATCH] test: Resolved and fixed a unit test Resolved merge conflicts and fixed test to run with `node-chakracore`. --- test/parallel/test-vm-new-script-new-context.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-vm-new-script-new-context.js b/test/parallel/test-vm-new-script-new-context.js index 539a4992d14..f274c8c08e7 100644 --- a/test/parallel/test-vm-new-script-new-context.js +++ b/test/parallel/test-vm-new-script-new-context.js @@ -50,7 +50,7 @@ assert.throws( common.engineSpecificMessage({ v8: /not defined/, chakracore: /undefined or null/ - })); +})); global.hello = 5; script = new Script('hello = 2'); @@ -91,9 +91,12 @@ assert.throws( common.engineSpecificMessage({ v8: /f is not defined/, chakracore: /'a' of undefined or null/ - })); +})); console.error('invalid this'); assert.throws(function() { script.runInNewContext.call('\'hello\';'); -}, /^TypeError: this\.runInContext is not a function$/); +}, common.engineSpecificMessage({ + v8: /^TypeError: this\.runInContext is not a function$/, + chakracore: /TypeError: Object doesn't support property or method 'runInContext'/ +}));