mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-14 17:41:22 +08:00
- Introduced tests for stale running fallback in CLI watch functionality to ensure proper handling of saved conversations. - Added compatibility tests for CodexLens CLI to verify index initialization despite compatibility conflicts. - Implemented tests for Smart Search MCP usage to validate default settings and path handling. - Created tests for UV Manager to ensure Python preference handling works as expected. - Added a detailed guide for CCW/Codex commands and skills, covering core commands, execution modes, and templates.
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
// ========================================
|
|
// Terminal Panel Store Tests
|
|
// ========================================
|
|
|
|
import { beforeEach, describe, expect, it } from 'vitest';
|
|
import { useTerminalPanelStore, selectTerminalCount } from './terminalPanelStore';
|
|
|
|
describe('terminalPanelStore', () => {
|
|
beforeEach(() => {
|
|
useTerminalPanelStore.getState().resetState();
|
|
});
|
|
|
|
it('resetState clears workspace-scoped terminal tabs and selection', () => {
|
|
const store = useTerminalPanelStore.getState();
|
|
|
|
store.openTerminal('session-a');
|
|
store.addTerminal('session-b');
|
|
store.setPanelView('queue');
|
|
|
|
const activeState = useTerminalPanelStore.getState();
|
|
expect(selectTerminalCount(activeState as any)).toBe(2);
|
|
expect(activeState.activeTerminalId).toBe('session-a');
|
|
expect(activeState.panelView).toBe('queue');
|
|
expect(activeState.isPanelOpen).toBe(true);
|
|
|
|
store.resetState();
|
|
|
|
const nextState = useTerminalPanelStore.getState();
|
|
expect(selectTerminalCount(nextState as any)).toBe(0);
|
|
expect(nextState.terminalOrder).toEqual([]);
|
|
expect(nextState.activeTerminalId).toBeNull();
|
|
expect(nextState.panelView).toBe('terminal');
|
|
expect(nextState.isPanelOpen).toBe(false);
|
|
});
|
|
});
|