Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
[Tests] npm v10.6.0 changed its error prefix from ERR! to error
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed May 21, 2024
1 parent 85db575 commit af8b7f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ test('fix option', (t) => {
t.equal(error.code, 1, 'error code is 1');
t.match(
hideWarnings(String(error).split('\n'))[1],
/^npm ERR! code (?:EAUDITNOLOCK|ENOLOCK|EUSAGE)$/,
/^npm (?:ERR!|error) code (?:EAUDITNOLOCK|ENOLOCK|EUSAGE)$/,
'error message has EAUDITNOLOCK or ENOLOCK or EUSAGE',
);
t.equal(stdout, '', 'no stdout output');
t.match(
hideWarnings(stderr.split('\n'))[0],
/^npm ERR! code (?:EAUDITNOLOCK|ENOLOCK|EUSAGE)$/,
/^npm (?:ERR!|error) code (?:EAUDITNOLOCK|ENOLOCK|EUSAGE)$/,
'stderr starts with expected error code',
);
});
Expand Down

1 comment on commit af8b7f9

@ljharb
Copy link
Owner Author

@ljharb ljharb commented on af8b7f9 May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.