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

Commit

Permalink
test: fix chakracore test failures
Browse files Browse the repository at this point in the history
* addons-napi/test_properties: Fixed message comparison
* inspector/test-inspector-stop-profile-after-done: Marked unsupported
  test flaky
* parallel/test-assert: Fixed message comparison
* parallel/test-console-count: Fixed message comparison
* parallel/test-crypto-dh-leak: Marked unsupported test flaky

PR-URL: #365
Reviewed-By: Hitesh Kanwathirtha <hiteshk@microsoft.com>
  • Loading branch information
kfarnung committed Aug 14, 2017
1 parent 263686a commit 2679098
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
5 changes: 4 additions & 1 deletion test/addons-napi/test_properties/test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
'use strict';
const common = require('../../common');
const assert = require('assert');
const readonlyErrorRE = /^TypeError: Cannot assign to read only property '.*' of object '#<Object>'$/;
const readonlyErrorRE = common.engineSpecificMessage({
v8: /^TypeError: Cannot assign to read only property '.*' of object '#<Object>'$/,
chakracore: /^TypeError: Assignment to read-only properties is not allowed in strict mode$/
});

// Testing api calls for defining properties
const test_object = require(`./build/${common.buildType}/test_properties`);
Expand Down
2 changes: 1 addition & 1 deletion test/inspector/inspector.status
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ prefix inspector
[$jsEngine==chakracore]
test-bindings : PASS,FLAKY
test-inspector-break-when-eval : PASS,FLAKY
test-inspector-stop-profile-after-done : PASS,FLAKY
test-off-with-session-then-on : PASS,FLAKY

1 change: 1 addition & 0 deletions test/parallel/parallel.status
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ test-buffer-sharedarraybuffer : PASS,FLAKY
test-child-process-promisified : PASS,FLAKY
test-cluster-inspector-debug-port : PASS,FLAKY
test-crypto-dh : PASS,FLAKY
test-crypto-dh-leak : PASS,FLAKY
test-debugger-repeat-last : PASS,FLAKY
test-domain-no-error-handler-abort-on-uncaught-0 : PASS,FLAKY
test-domain-no-error-handler-abort-on-uncaught-1 : PASS,FLAKY
Expand Down
5 changes: 4 additions & 1 deletion test/parallel/test-assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ assert.throws(
() => { assert.throws(() => { throw new Error(); }, { foo: 'bar' }); },
common.expectsError({
type: TypeError,
message: 'expected.test is not a function'
message: common.engineSpecificMessage({
v8: 'expected.test is not a function',
chakracore: 'Object doesn\'t support property or method \'test\''
})
})
);

Expand Down
14 changes: 11 additions & 3 deletions test/parallel/test-console-count.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

require('../common');
const common = require('../common');
const assert = require('assert');

const stdoutWrite = process.stdout.write;
Expand Down Expand Up @@ -57,7 +57,15 @@ process.stdout.write = stdoutWrite;
// Symbol labels do not work
assert.throws(
() => console.count(Symbol('test')),
/^TypeError: Cannot convert a Symbol value to a string$/);
common.engineSpecificMessage({
v8: /^TypeError: Cannot convert a Symbol value to a string$/,
chakracore: /^TypeError: Object doesn't support property or method 'ToString'$/
})
);
assert.throws(
() => console.countReset(Symbol('test')),
/^TypeError: Cannot convert a Symbol value to a string$/);
common.engineSpecificMessage({
v8: /^TypeError: Cannot convert a Symbol value to a string$/,
chakracore: /^TypeError: Object doesn't support property or method 'ToString'$/
})
);

0 comments on commit 2679098

Please sign in to comment.