From e317a616a91487b7dd43d3215839d9c6f3be55d0 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 28 Feb 2017 20:33:12 +0100 Subject: [PATCH] test: fix test-internal-util-assertCrypto regex When building --without-ssl and then running: out/Release/node --expose-internals test/parallel/test-internal-util-assertCrypto.js The following error is displayed: assert.js:420 throw actual; ^ Error: Node.js is not compiled with openssl crypto support at Object.exports.assertCrypto (internal/util.js:82:11) at assert.throws (/Users/danielbevenius/work/nodejs/node/test/parallel/test-internal-util-assertCrypto.js:8:28) at _tryBlock (assert.js:379:5) at _throws (assert.js:398:12) at Function.throws (assert.js:428:3) at Object. (/Users/danielbevenius/work/nodejs/node/test/parallel/test-internal-util-assertCrypto.js:8:10) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) It looks like the regex is not taking into account the 'Error: ' hence the failure to match it. PR-URL: https://github.com/nodejs/node/pull/11620 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Yuta Hiroto Reviewed-By: Santiago Gimeno Reviewed-By: Colin Ihrig --- test/parallel/test-internal-util-assertCrypto.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-internal-util-assertCrypto.js b/test/parallel/test-internal-util-assertCrypto.js index f3003a2fee04e9..3a7acdb65c6b89 100644 --- a/test/parallel/test-internal-util-assertCrypto.js +++ b/test/parallel/test-internal-util-assertCrypto.js @@ -6,7 +6,7 @@ const util = require('internal/util'); if (!process.versions.openssl) { assert.throws(() => util.assertCrypto(), - /^Node.js is not compiled with openssl crypto support$/); + /^Error: Node.js is not compiled with openssl crypto support$/); } else { assert.doesNotThrow(() => util.assertCrypto()); }