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', ); });