Skip to content

test: add 11 unit tests for lib/state.ts#208

Open
TerminalGravity wants to merge 2 commits intomainfrom
test/state-coverage
Open

test: add 11 unit tests for lib/state.ts#208
TerminalGravity wants to merge 2 commits intomainfrom
test/state-coverage

Conversation

@TerminalGravity
Copy link
Collaborator

Covers loadState, saveState, appendLog, readLog (including lastN, corrupt line handling, and 5MB log rotation), and now().

Also closed issue #172 and 4 stale duplicate PRs (#204-207) — fix was already on main.

Test count: 43 → 54.

- examples/.preflight/config.yml — profile, related projects, thresholds, embeddings
- examples/.preflight/triage.yml — keyword rules and strictness tuning
- examples/.preflight/contracts/api.yml — manual cross-service contract definitions
- examples/README.md — quick setup instructions
- README.md — link to examples from config reference section
Covers loadState, saveState, appendLog, readLog (including lastN,
corrupt line handling, and 5MB rotation), and now().

Brings test count from 43 → 54.
Copy link
Collaborator Author

@TerminalGravity TerminalGravity left a comment

Choose a reason for hiding this comment

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

Reviewed — solid state module coverage. The corrupt line handling and 5MB log rotation tests are especially good to have. Ready to merge.

Copy link
Collaborator Author

@TerminalGravity TerminalGravity left a comment

Choose a reason for hiding this comment

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

11 tests for state.ts — good coverage for a critical module. 👍

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