import { test, describe } from 'node:test'; import assert from 'node:assert'; import { GroveApp } from '../components/GroveApp.js'; import type { WorktreeInfo, Config } from '../types/index.js'; describe('GroveApp', () => { const mockWorktree: WorktreeInfo = { name: 'test-project-feature', path: '/tmp/test-worktree', branch: 'feature/test', exists: true }; const mockConfig: Config = { worktreeLocation: '../', projectName: null, quickCommands: { test: 'npm test', lint: 'npm run lint', build: 'npm run build', dev: 'npm run dev' }, autoStart: { claudeCode: false // Disable auto-start for testing } }; test('GroveApp should initialize with correct properties', () => { const app = new GroveApp({ worktree: mockWorktree, config: mockConfig }); assert.ok(app instanceof GroveApp); }); test('GroveApp constructor should accept worktree and config', () => { assert.doesNotThrow(() => { new GroveApp({ worktree: mockWorktree, config: mockConfig }); }); }); test('GroveApp should handle different config combinations', () => { const configWithAutoStart: Config = { ...mockConfig, autoStart: { claudeCode: true } }; assert.doesNotThrow(() => { new GroveApp({ worktree: mockWorktree, config: configWithAutoStart }); }); }); });