Skip to content

Commit d26a552

Browse files
authored
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.
1 parent 7b193d8 commit d26a552

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/main.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ describe(`handle integrity checks`, () => {
10211021
});
10221022
});
10231023
});
1024-
it(`should return an error when signature does not match with a tag`, async () => {
1024+
it(`should return an error when signature does not match with a range`, async () => {
10251025
process.env.TEST_INTEGRITY = `invalid_signature`; // See `_registryServer.mjs`
10261026

10271027
await xfs.mktempPromise(async cwd => {
@@ -1030,6 +1030,12 @@ describe(`handle integrity checks`, () => {
10301030
stderr: expect.stringContaining(`Signature does not match`),
10311031
stdout: ``,
10321032
});
1033+
});
1034+
});
1035+
it(`should return an error when signature does not match with a tag`, async () => {
1036+
process.env.TEST_INTEGRITY = `invalid_signature`; // See `_registryServer.mjs`
1037+
1038+
await xfs.mktempPromise(async cwd => {
10331039
await expect(runCli(cwd, [`pnpm@latest`, `--version`], true)).resolves.toMatchObject({
10341040
exitCode: 1,
10351041
stderr: expect.stringContaining(`Signature does not match`),

0 commit comments

Comments
 (0)