From af8b7f98b28cf0b2eeb1213b03de5ee44e027390 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 21 May 2024 16:40:51 -0700 Subject: [PATCH] [Tests] npm v10.6.0 changed its error prefix from `ERR!` to `error` --- test/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/index.js b/test/index.js index 4d45a60..69667c0 100644 --- a/test/index.js +++ b/test/index.js @@ -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', ); });