Skip to content

Commit

Permalink
fix doctor test to work correctly for node pre-release versions
Browse files Browse the repository at this point in the history
PR-URL: #2358
Credit: @nlf
Close: #2358
Reviewed-by: @ruyadorno
Reviewed-by: @MylesBorins
  • Loading branch information
nlf authored and isaacs committed Dec 18, 2020
1 parent c6775ef commit 628a554
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/lib/doctor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {}
Expand Down

0 comments on commit 628a554

Please sign in to comment.