Skip to content

Unskip useWorktreeSummaries test suite #246

@gregpriday

Description

@gregpriday

Summary

The test suite for useWorktreeSummaries hook is wrapped in describe.skip(), meaning these tests never run. This is a critical hook in the AI summarization pipeline and regressions could go undetected.

Current Behavior

tests/hooks/useWorktreeSummaries.test.tsx:51 uses describe.skip():

describe.skip('useWorktreeSummaries', () => {

Tests that are skipped:

  • enriches worktrees after the debounce interval
  • debounces rapid successive updates
  • preserves existing summaries when worktree list changes
  • skips enrichment when no changes are provided

Expected Behavior

These tests should run as part of the normal test suite to catch regressions in AI summary generation.

Affected Files

Deliverables

Tests

  • Unskip the test suite
  • Fix any flaky tests (likely related to fake timers and async hook flushing)
  • Consider adding tests for edge cases:
    • No API key / fallback behavior
    • AI service errors
    • Clean worktree handling

Root Cause

Unknown - tests may have been skipped due to flakiness with fake timers or async behavior. Investigation needed.

Tasks

  • Change describe.skip to describe at line 51
  • Run tests and identify any failures
  • Fix timer/async issues if tests are flaky (ensure proper vi.advanceTimersByTime and Promise.resolve() flushing)
  • Consider stabilizing with waitFor or act() patterns if needed
  • Verify all 4 tests pass consistently

Acceptance Criteria

  • describe.skip replaced with describe
  • All 4 tests in the suite pass
  • Tests are stable (no flakiness over 10+ runs)
  • CI pipeline runs these tests

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions