Skip to content

Commit

Permalink
test: update test-npm-install for newer npm
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
richardlau authored and targos committed May 8, 2024
1 parent da85492 commit 92123f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/npm/test-npm-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 92123f7

Please sign in to comment.