diff options
author | nlf <quitlahok@gmail.com> | 2020-12-16 00:10:10 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2020-12-18 22:18:38 +0300 |
commit | 628a554bc113e4e115d34778bfe8a77cfad1d933 (patch) | |
tree | 5ce9ac1daf79be2c9bc85abe851c7f5c7e386b8a /test | |
parent | c6775efba65aa59f13e2a9c088dd65fd81c8b6b0 (diff) |
fix doctor test to work correctly for node pre-release versionsnlf/fix-doctor-tests
PR-URL: https://github.com/npm/cli/pull/2358
Credit: @nlf
Close: #2358
Reviewed-by: @ruyadorno
Reviewed-by: @mylesborins
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/doctor.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/doctor.js b/test/lib/doctor.js index c2c3fdb97..db41fc8e5 100644 --- a/test/lib/doctor.js +++ b/test/lib/doctor.js @@ -479,7 +479,7 @@ test('npm doctor outdated nodejs version', t => { npm.globalDir = dir npm.localBin = dir npm.globalBin = dir - nodeVersions.push({ version: process.version.replace(/\d+$/, '999'), lts: false }) + nodeVersions.push({ version: process.version.replace(/\d+(-.*)?$/, '999'), lts: false }) const consoleError = console.error // we just print an empty line here, so swallow it and ignore console.error = () => {} |