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
  • Loading branch information
nlf committed Dec 15, 2020
1 parent e8c3796 commit edad2b9
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 edad2b9

Please sign in to comment.