Skip to content

Commit af544ab

Browse files
targosTrott
authored andcommitted
test: do not run release-npm test without crypto
npm requires crypto support and cannot be loaded without it. PR-URL: nodejs#30265 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
1 parent 2bdeb88 commit af544ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/parallel/test-release-npm.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ const path = require('path');
77

88
const releaseReg = /^v\d+\.\d+\.\d+$/;
99

10-
if (!releaseReg.test(process.version)) {
10+
// Npm requires crypto support.
11+
if (!releaseReg.test(process.version) || !common.hasCrypto) {
1112
common.skip('This test is only for release builds');
1213
}
1314

1415
{
15-
// Verify that npm does not print out a warning when executed
16+
// Verify that npm does not print out a warning when executed.
1617

1718
const npmCli = path.join(__dirname, '../../deps/npm/bin/npm-cli.js');
1819
const npmExec = child_process.spawnSync(process.execPath, [npmCli]);

0 commit comments

Comments
 (0)