From ca3e746da84f248b0a943d00e723ee902b1f1021 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 17 Oct 2017 16:59:30 -0700 Subject: [PATCH] test: make test-tls-external-accessor agnostic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: https://github.com/nodejs/node/pull/20456 PR-URL: https://github.com/nodejs/node/pull/16272 Reviewed-By: Michaël Zasso Reviewed-By: Refael Ackermann Reviewed-By: Yuta Hiroto Reviewed-By: Joyee Cheung Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Benjamin Gruenbaum Reviewed-By: Tobias Nießen --- test/parallel/test-tls-external-accessor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-tls-external-accessor.js b/test/parallel/test-tls-external-accessor.js index 2d7b1f62b98..33d371923a6 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; }