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

Commit 76da668

Browse files
committed
test: Updated baseline for chakracore
* test-require-json.js : We have modified the error message we throw. * test-util-inspect.js : This is interesting. Correct behavior is what I updated to now because `Promise` object has been overwritten by function. However earlier, we would hit the assert only if I add `console.log(Promise)` right before assert statement. I didn't spend much time but updated the baseline with correct behavior. PR-URL: #109 Reviewed-By: Jianchun Xu <Jianchun.Xu@microsoft.com>
1 parent 0bddd5d commit 76da668

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

test/parallel/test-require-json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ try {
88
} catch (err) {
99
var re = common.engineSpecificMessage({
1010
v8: /test[\/\\]fixtures[\/\\]invalid.json: Unexpected string/,
11-
chakracore: /test[\/\\]fixtures[\/\\]invalid.json: Expected '}'/
11+
chakracore: /test[\/\\]fixtures[\/\\]invalid.json: JSON.parse Error: Expected '}'/
1212
});
1313
var i = err.message.match(re);
1414
assert(null !== i, 'require() json error should include path');

test/parallel/test-util-inspect.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,9 +582,10 @@ assert.equal(util.inspect(promise), common.engineSpecificMessage({
582582
// a bonafide native Promise.
583583
var oldPromise = Promise;
584584
global.Promise = function() { this.bar = 42; };
585+
585586
assert.equal(util.inspect(new Promise()), common.engineSpecificMessage({
586587
v8: '{ bar: 42 }',
587-
chakracore: 'Promise { \'<unknown>\', bar: 42 }'
588+
chakracore: 'Object { \'<unknown>\', bar: 42 }'
588589
}));
589590
global.Promise = oldPromise;
590591

0 commit comments

Comments
 (0)