Skip to content

Commit 326fa97

Browse files
authored
test(test): guard status filter validation order (#222)
Co-authored-by: Lexiie <28455136+Lexiie@users.noreply.github.com>
1 parent 9d4af09 commit 326fa97

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
@@ -470,6 +470,14 @@ describe('runList', () => {
470470
).rejects.toMatchObject({ code: 'VALIDATION_ERROR' });
471471
});
472472

473+
it('rejects --status=junk before reading credentials', async () => {
474+
const test = createTestCommand();
475+
disableExits(test);
476+
await expect(
477+
test.parseAsync(['list', '--project', 'project_alice', '--status', 'junk'], { from: 'user' }),
478+
).rejects.toMatchObject({ code: 'VALIDATION_ERROR' });
479+
});
480+
473481
it('rejects --page-size=0 locally with VALIDATION_ERROR (no network call)', async () => {
474482
const { credentialsPath } = makeCreds();
475483
const fetchImpl = makeFetch(() => {

0 commit comments

Comments
 (0)