mirror of https://github.com/nodejs/corepack.git
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:
parent
7b193d8498
commit
d26a552daa
|
|
@ -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`),
|
||||
|
|
|
|||
Loading…
Reference in New Issue