Skip to content

Commit bcaf612

Browse files
authored
fix(tests): update E2E exit code assertions for usage errors (#567)
Argument/usage errors now correctly exit with code 2 (EX_USAGE) since the exit-codes feature landed. Update the two affected E2E assertions: - unknown command → 2 (usage error, not generic failure) - plugin update without args → 2 (ArgumentError)
1 parent 812f27a commit bcaf612

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/e2e/management.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,6 @@ describe('management commands E2E', () => {
101101
// ── unknown command ──
102102
it('unknown command shows error', async () => {
103103
const { stderr, code } = await runCli(['nonexistent-command-xyz']);
104-
expect(code).toBe(1);
104+
expect(code).toBe(2);
105105
});
106106
});

tests/e2e/plugin-management.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ describe('plugin management E2E', () => {
134134

135135
it('plugin update without name or --all shows error', async () => {
136136
const { stderr, code } = await runPluginCli(['plugin', 'update']);
137-
expect(code).toBe(1);
137+
expect(code).toBe(2);
138138
expect(stderr).toContain('specify a plugin name');
139139
});
140140
});

0 commit comments

Comments
 (0)