test: add session-parser test coverage (17 new tests) - #85
Closed
TerminalGravity wants to merge 2 commits into
Closed
test: add session-parser test coverage (17 new tests)#85TerminalGravity wants to merge 2 commits into
TerminalGravity wants to merge 2 commits into
Conversation
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.
Collaborator
Author
|
17 new tests for session-parser — CI green. LGTM, ready for approval. ✅ |
Collaborator
Author
|
Superseded by a newer PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 discoveryparseSession— 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 parserparseAllSessions— multi-file timestamp sorting,sincefilterTest count: 43 → 60 (all passing)