From 41b839f8493210854705abcdd61dfa91fd9d4028 Mon Sep 17 00:00:00 2001 From: nlf Date: Tue, 15 Dec 2020 13:10:10 -0800 Subject: [PATCH] deps: fix npm doctor tests for pre-release node Refs: https://github.com/npm/cli/pull/2358 --- deps/npm/test/lib/doctor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/npm/test/lib/doctor.js b/deps/npm/test/lib/doctor.js index c2c3fdb9781f29..db41fc8e5dd56b 100644 --- a/deps/npm/test/lib/doctor.js +++ b/deps/npm/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 = () => {}