chore(tests): split `invalid_signature` test in two (#651)

Ranges and tags are not the same thing, it can be useful to have two
different tests in case only one of them fail.
This commit is contained in:
Antoine du Hamel 2025-02-12 11:14:34 +01:00 committed by GitHub
parent 7b193d8498
commit d26a552daa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -1021,7 +1021,7 @@ describe(`handle integrity checks`, () => {
});
});
});
it(`should return an error when signature does not match with a tag`, async () => {
it(`should return an error when signature does not match with a range`, async () => {
process.env.TEST_INTEGRITY = `invalid_signature`; // See `_registryServer.mjs`
await xfs.mktempPromise(async cwd => {
@ -1030,6 +1030,12 @@ describe(`handle integrity checks`, () => {
stderr: expect.stringContaining(`Signature does not match`),
stdout: ``,
});
});
});
it(`should return an error when signature does not match with a tag`, async () => {
process.env.TEST_INTEGRITY = `invalid_signature`; // See `_registryServer.mjs`
await xfs.mktempPromise(async cwd => {
await expect(runCli(cwd, [`pnpm@latest`, `--version`], true)).resolves.toMatchObject({
exitCode: 1,
stderr: expect.stringContaining(`Signature does not match`),