test: only run prime test with supported OpenSSL

PR-URL: https://github.com/nodejs/node/pull/37212
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Tobias Nießen authored and Rich Trott committed 2021-02-08 16:48:49 -08:00
1 parent 11d20106ea
commit 6e804a9f1a
1 file changed
+8 -6
+8 -6
View File
@@ -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) => {