Skip to content

Commit 7bb9edd

Browse files
committed
test(test): guard status filter validation order
1 parent 3305dfa commit 7bb9edd

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/commands/test.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,14 @@ describe('runList', () => {
464464
).rejects.toMatchObject({ code: 'VALIDATION_ERROR' });
465465
});
466466

467+
it('rejects --status=junk before reading credentials', async () => {
468+
const test = createTestCommand();
469+
disableExits(test);
470+
await expect(
471+
test.parseAsync(['list', '--project', 'project_alice', '--status', 'junk'], { from: 'user' }),
472+
).rejects.toMatchObject({ code: 'VALIDATION_ERROR' });
473+
});
474+
467475
it('rejects --page-size=0 locally with VALIDATION_ERROR (no network call)', async () => {
468476
const { credentialsPath } = makeCreds();
469477
const fetchImpl = makeFetch(() => {

0 commit comments

Comments
 (0)