Skip to content

test: add comprehensive tests for state module#102

Open
TerminalGravity wants to merge 1 commit intomainfrom
test/add-state-tests
Open

test: add comprehensive tests for state module#102
TerminalGravity wants to merge 1 commit intomainfrom
test/add-state-tests

Conversation

@TerminalGravity
Copy link
Collaborator

Adds 10 tests for src/lib/state.ts covering loadState/saveState, appendLog/readLog, JSONL corruption handling, log rotation at 5MB, and the now() helper.

All 53 tests pass. No prod code changes.


Automated PR by pf-eng-agent

Adds 10 tests covering:
- loadState/saveState round-trip, missing files, corrupt JSON, overwrites
- appendLog/readLog JSONL operations, lastN filtering, corrupt line handling
- Log rotation when exceeding 5MB threshold
- now() ISO timestamp validity

Brings test count from 43 to 53.
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