Skip to content

Add tests for custom hooks (useShows, useSongs, useDeleteShow)#100

Closed
rossvz wants to merge 1 commit into
masterfrom
continuous-claude/iteration-4/2025-11-21-46285142
Closed

Add tests for custom hooks (useShows, useSongs, useDeleteShow)#100
rossvz wants to merge 1 commit into
masterfrom
continuous-claude/iteration-4/2025-11-21-46285142

Conversation

@rossvz

@rossvz rossvz commented Nov 21, 2025

Copy link
Copy Markdown
Owner

fetching and manipulation. All hooks now have 100% coverage with tests that
verify loading states, data transformation, memoization, and edge cases.

Test additions:

  • useDeleteShow.test.ts: 4 tests covering Firebase remove operations and
    callback memoization behavior
  • useShows.test.ts: 7 tests for show data fetching, formatting, and
    filtering of past shows
  • useSongs.test.ts: 8 tests for song data with complex sorting (visible >
    votes > title) and case-insensitive search filtering

Updated Firebase mocks in test setup to include limitToLast and startAfter
for query operations used by these hooks.

Test suite now at 52 passing tests in 8 files with overall coverage
increased from 46.39% to 48.6%.

Added comprehensive test coverage for three custom hooks that manage data
fetching and manipulation. All hooks now have 100% coverage with tests that
verify loading states, data transformation, memoization, and edge cases.

Test additions:
- useDeleteShow.test.ts: 4 tests covering Firebase remove operations and
  callback memoization behavior
- useShows.test.ts: 7 tests for show data fetching, formatting, and
  filtering of past shows
- useSongs.test.ts: 8 tests for song data with complex sorting (visible >
  votes > title) and case-insensitive search filtering

Updated Firebase mocks in test setup to include limitToLast and startAfter
for query operations used by these hooks.

Test suite now at 52 passing tests in 8 files with overall coverage
increased from 46.39% to 48.6%.
@rossvz rossvz closed this Nov 21, 2025
@rossvz
rossvz deleted the continuous-claude/iteration-4/2025-11-21-46285142 branch November 21, 2025 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant