From af544abf2c3ec3f0ee3b4ef1b1f45ffa49291d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 5 Nov 2019 12:54:08 +0100 Subject: [PATCH] test: do not run release-npm test without crypto npm requires crypto support and cannot be loaded without it. PR-URL: https://github.com/nodejs/node/pull/30265 Reviewed-By: Gireesh Punathil Reviewed-By: David Carlier Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: Jiawen Geng --- test/parallel/test-release-npm.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-release-npm.js b/test/parallel/test-release-npm.js index 23d9cb39cea182..412cb0cc64acb7 100644 --- a/test/parallel/test-release-npm.js +++ b/test/parallel/test-release-npm.js @@ -7,12 +7,13 @@ const path = require('path'); const releaseReg = /^v\d+\.\d+\.\d+$/; -if (!releaseReg.test(process.version)) { +// Npm requires crypto support. +if (!releaseReg.test(process.version) || !common.hasCrypto) { common.skip('This test is only for release builds'); } { - // Verify that npm does not print out a warning when executed + // Verify that npm does not print out a warning when executed. const npmCli = path.join(__dirname, '../../deps/npm/bin/npm-cli.js'); const npmExec = child_process.spawnSync(process.execPath, [npmCli]);