From 92123f79d16851322aedf1acd66c3c4c375aa7d3 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Wed, 8 May 2024 16:21:10 +0000 Subject: [PATCH] test: update `test-npm-install` for newer npm Newer versions of npm have subtly changed the prefix for error output. Amend `test-npm-install` to work with both older and newer npm output. --- test/npm/test-npm-install.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/npm/test-npm-install.js b/test/npm/test-npm-install.js index a8d55f53..e13e4953 100644 --- a/test/npm/test-npm-install.js +++ b/test/npm/test-npm-install.js @@ -92,7 +92,8 @@ test('npm-install: failed install', async (t) => { }); const expected = { testOutput: /^$/, - testError: /npm ERR! 404 Not [Ff]ound\s*(:)? .*THIS-WILL-FAIL(@0\.0\.1)?/ + testError: + /npm (?:ERR!|error) 404 Not [Ff]ound\s*(:)? .*THIS-WILL-FAIL(@0\.0\.1)?/ }; try { await packageManagerInstall('npm', context);