diff --git a/__tests__/api/backlog-realtime.test.ts b/__tests__/api/backlog-realtime.test.ts index 3d1f386..4898cda 100644 --- a/__tests__/api/backlog-realtime.test.ts +++ b/__tests__/api/backlog-realtime.test.ts @@ -88,21 +88,21 @@ describe('GET /api/realtime/backlog', () => { describe('shouldEmit scope filter (via backlog-store reducer)', () => { it('applyChange: pbi INSERT adds to pbis array', () => { useBacklogStore.setState({ pbis: [], storiesByPbi: {}, tasksByStory: {} }) - const pbi = { id: 'pbi-1', code: 'PBI-1', title: 'Test', priority: 2, created_at: new Date(), status: 'open' } + const pbi = { id: 'pbi-1', code: 'PBI-1', title: 'Test', priority: 2, created_at: new Date(), status: 'ready' as const } useBacklogStore.getState().applyChange('pbi', 'I', pbi) expect(useBacklogStore.getState().pbis).toHaveLength(1) expect(useBacklogStore.getState().pbis[0].id).toBe('pbi-1') }) it('applyChange: pbi UPDATE patches existing pbi', () => { - const pbi = { id: 'pbi-1', code: 'PBI-1', title: 'Old', priority: 2, created_at: new Date(), status: 'open' } + const pbi = { id: 'pbi-1', code: 'PBI-1', title: 'Old', priority: 2, created_at: new Date(), status: 'ready' as const } useBacklogStore.setState({ pbis: [pbi], storiesByPbi: {}, tasksByStory: {} }) useBacklogStore.getState().applyChange('pbi', 'U', { id: 'pbi-1', title: 'New' }) expect(useBacklogStore.getState().pbis[0].title).toBe('New') }) it('applyChange: pbi DELETE removes pbi', () => { - const pbi = { id: 'pbi-1', code: 'PBI-1', title: 'Test', priority: 2, created_at: new Date(), status: 'open' } + const pbi = { id: 'pbi-1', code: 'PBI-1', title: 'Test', priority: 2, created_at: new Date(), status: 'ready' as const } useBacklogStore.setState({ pbis: [pbi], storiesByPbi: {}, tasksByStory: {} }) useBacklogStore.getState().applyChange('pbi', 'D', { id: 'pbi-1' }) expect(useBacklogStore.getState().pbis).toHaveLength(0) diff --git a/__tests__/components/backlog/integration.test.tsx b/__tests__/components/backlog/integration.test.tsx index 65c0a0d..928ccce 100644 --- a/__tests__/components/backlog/integration.test.tsx +++ b/__tests__/components/backlog/integration.test.tsx @@ -48,8 +48,6 @@ vi.mock('@dnd-kit/sortable', () => ({ }), verticalListSortingStrategy: {}, rectSortingStrategy: {}, - arrayMove: (arr: unknown[]) => arr, - rectSortingStrategy: {}, sortableKeyboardCoordinates: {}, arrayMove: (arr: unknown[]) => arr, }))