summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2017-10-17 16:59:30 -0700
committerEvan Lucas <evanlucas@me.com>2017-11-13 07:59:53 -0600
commit31365788714bb3b87972ae090fe2d55a23800d33 (patch)
treee7f208ae2e3560bd9fa13fa4781983592c6b027c
parent0be7f8c48c558f93956f43bcd912f8f330073704 (diff)
downloadnode-new-31365788714bb3b87972ae090fe2d55a23800d33.tar.gz
test: make test-tls-external-accessor agnostic
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. PR-URL: https://github.com/nodejs/node/pull/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>
-rw-r--r--test/parallel/test-tls-external-accessor.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-tls-external-accessor.js b/test/parallel/test-tls-external-accessor.js
index 2d7b1f62b9..33d371923a 100644
--- a/test/parallel/test-tls-external-accessor.js
+++ b/test/parallel/test-tls-external-accessor.js
@@ -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;
}