From 752c94d202db07f6c4304218a985941a5eac4a3a 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 PR-URL: https://github.com/nodejs/node/pull/36543 Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Ruy Adorno Reviewed-By: Joyee Cheung --- 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 = () => {}