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

Commit

Permalink
test: make test-tls-external-accessor agnostic
Browse files Browse the repository at this point in the history
Remove reliance on V8-specific error messages in
test/parallel/test-tls-external-accessor.js.

Check that the error is a `TypeError`.

The test should now be successful without modification using ChakraCore.

Backport-PR-URL: nodejs/node#20456
PR-URL: nodejs/node#16272
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
Trott authored and jasonrudolph committed Jun 15, 2018
1 parent a3e6208 commit ca3e746
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-tls-external-accessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ const tls = require('tls');
{
const pctx = tls.createSecureContext().context;
const cctx = Object.create(pctx);
assert.throws(() => cctx._external, /incompatible receiver/);
assert.throws(() => cctx._external, TypeError);
pctx._external;
}
{
const pctx = tls.createSecurePair().credentials.context;
const cctx = Object.create(pctx);
assert.throws(() => cctx._external, /incompatible receiver/);
assert.throws(() => cctx._external, TypeError);
pctx._external;
}

0 comments on commit ca3e746

Please sign in to comment.