From 8483de4da8ba68d5bebb031c94a90c10dc44ccd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Fri, 5 Feb 2021 17:26:09 +0100 Subject: [PATCH] test: only run prime test with supported OpenSSL PR-URL: https://github.com/nodejs/node/pull/37212 Reviewed-By: Benjamin Gruenbaum Reviewed-By: James M Snell Reviewed-By: Rich Trott --- test/parallel/test-crypto-prime.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-crypto-prime.js b/test/parallel/test-crypto-prime.js index 7afb34651f5227..749221b4514ef3 100644 --- a/test/parallel/test-crypto-prime.js +++ b/test/parallel/test-crypto-prime.js @@ -211,12 +211,14 @@ generatePrime( code: 'ERR_OUT_OF_RANGE' }); - // This is possible and allowed (but makes little sense). - assert.strictEqual(generatePrimeSync(4, { - add: 15n, - rem: 13n, - bigint: true - }), 13n); + if (process.versions.openssl >= '1.1.1f') { + // This is possible and allowed (but makes little sense). + assert.strictEqual(generatePrimeSync(4, { + add: 15n, + rem: 13n, + bigint: true + }), 13n); + } } [1, 'hello', {}, []].forEach((i) => {