Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
test: Resolved and fixed a unit test
Browse files Browse the repository at this point in the history
Resolved merge conflicts and fixed test to run with `node-chakracore`.
  • Loading branch information
kunalspathak committed May 22, 2017
1 parent 65a4750 commit b3b3626
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/parallel/test-vm-new-script-new-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ assert.throws(
common.engineSpecificMessage({
v8: /not defined/,
chakracore: /undefined or null/
}));
}));

global.hello = 5;
script = new Script('hello = 2');
Expand Down Expand Up @@ -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'/
}));

0 comments on commit b3b3626

Please sign in to comment.