Skip to content

Commit

Permalink
test: only run prime test with supported OpenSSL
Browse files Browse the repository at this point in the history
  • Loading branch information
tniessen committed Feb 5, 2021
1 parent cd94327 commit d35d516
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/parallel/test-crypto-prime.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,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) => {
Expand Down

0 comments on commit d35d516

Please sign in to comment.