Skip to content

test: add session-parser test coverage (17 new tests) - #85

Closed
TerminalGravity wants to merge 2 commits into
mainfrom
test/session-parser-coverage-2
Closed

test: add session-parser test coverage (17 new tests)#85
TerminalGravity wants to merge 2 commits into
mainfrom
test/session-parser-coverage-2

Conversation

@TerminalGravity

Copy link
Copy Markdown
Collaborator

Adds comprehensive test suite for src/lib/session-parser.ts, one of the larger untested modules.

17 new tests covering:

  • findSessionFiles — top-level and subagent directory discovery
  • parseSession — prompts, assistant responses, tool calls, sub-agent spawns, corrections, errors, compaction events, summary records, malformed JSON handling, epoch timestamps (seconds + ms)
  • parseSessionAsync — parity verification with sync parser
  • parseAllSessions — multi-file timestamp sorting, since filter

Test count: 43 → 60 (all passing)

Covers common issues: LanceDB native modules, first-run model download,
missing session data, .preflight/ config not loading, tools not appearing
in Claude Code, and permission errors.
17 new tests covering findSessionFiles, parseSession, parseSessionAsync, and parseAllSessions. Covers prompts, corrections, tool calls, sub-agent spawns, errors, compaction, summary records, malformed JSON, epoch timestamps, and multi-file sorting.

Test count: 43 → 60.
@TerminalGravity

Copy link
Copy Markdown
Collaborator Author

17 new tests for session-parser — CI green. LGTM, ready for approval. ✅

@TerminalGravity TerminalGravity left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great test coverage push today — 68 new tests across four PRs (#79, #82, #83, #85). All CI green. This is the kind of foundation that makes the shell-args refactor (#89) safe to do confidently. 👏

@TerminalGravity

Copy link
Copy Markdown
Collaborator Author

Superseded by a newer PR.

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