Skip to content

Add unit tests for sessions parser#9

Merged
abachman merged 4 commits intomainfrom
add-tests
Mar 25, 2026
Merged

Add unit tests for sessions parser#9
abachman merged 4 commits intomainfrom
add-tests

Conversation

@abachman
Copy link
Copy Markdown
Member

Summary

  • Add sessions_test.go with table-driven tests for oneLine, truncateRunes, summarizeToolInput, and normalizeRecord
  • Add testdata fixtures (simple.jsonl, tool_use.jsonl, empty.jsonl) for integration-style ParseSessionFile tests
  • Add coverage Makefile target matching CI flags (-race, -coverpkg, -covermode=atomic)

Test plan

  • go test ./internal/claude/... — all 20 tests pass
  • make coverage — runs with race detector and generates coverage.txt

🤖 Generated with Claude Code

@abachman abachman enabled auto-merge (squash) March 25, 2026 15:48
@abachman abachman merged commit 913ae30 into main Mar 25, 2026
6 checks passed
@abachman abachman deleted the add-tests branch March 25, 2026 15:57
@github-actions
Copy link
Copy Markdown

⚠️ Note: Baseline coverage from main branch is not available (artifact may be expired). Showing current coverage for changed files only.

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/reasonable-systems/ccsessions/internal/claude 0.00% (ø)

Coverage by file

Changed unit test files

  • github.com/reasonable-systems/ccsessions/internal/claude/sessions_test.go

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