Skip to content

Commit

Permalink
[Tests] npm 9+ throws EUSAGE for a non-lockfile npm audit, now
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Dec 3, 2023
1 parent dcbce75 commit b38d220
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 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)$/,
'error message has EAUDITNOLOCK or ENOLOCK',
/^npm ERR! 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)$/,
/^npm ERR! code (?:EAUDITNOLOCK|ENOLOCK|EUSAGE)$/,
'stderr starts with expected error code',
);
});
Expand Down

0 comments on commit b38d220

Please sign in to comment.