Skip to content

Add tests for loadEntries and countEntries with malformed history lines #108

@404-Page-Found

Description

@404-Page-Found

Task summary

Add tests that verify loadEntries() and countEntries() behavior when history.jsonl contains malformed JSON lines mixed with valid entries.

Why this is a good first issue

The parser logic is simple, and this task is a contained test addition with clear expected outcomes.

Suggested files or areas

  • src/history/store.ts
  • tests/history-profile.test.mjs or a new history-store focused test file

Acceptance criteria

  • Add a test that confirms malformed lines are skipped by loadEntries() while valid lines are returned.
  • Add/clarify expected behavior for countEntries() with malformed lines.
  • Keep existing history/profile tests passing.
  • Document assumptions in test names/comments.

Extra context

loadEntries() currently catches JSON parse errors and returns only valid entries, but this behavior should be explicitly regression-tested.

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions