Skip to content

Commit 890e2ba

Browse files
zkatMyles Borins
authored and
Myles Borins
committed
test: make npm tests work on prerelease node versions
PR-URL: #4960 Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 393d652 commit 890e2ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

deps/npm/test/common-tap.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ process.env.npm_config_cache = exports.npm_config_cache = npm_config_cache
1818
process.env.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig')
1919
process.env.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig')
2020
process.env.random_env_var = 'foo'
21+
// suppress warnings about using a prerelease version of node
22+
process.env.npm_config_node_version = process.version.replace(/-.*$/, '')
2123

2224
var bin = exports.bin = require.resolve('../bin/npm-cli.js')
2325
var chain = require('slide').chain

0 commit comments

Comments
 (0)