Skip to content

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: #20456
PR-URL: #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 MylesBorins committed May 2, 2018
1 parent 9e68947 commit 7eba62e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-tls-external-accessor.js
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 7eba62e

Please sign in to comment.