Skip to content

test: add unit tests for export-report helpers - #272

Open
TerminalGravity wants to merge 3 commits into
mainfrom
test/export-report-unit-tests
Open

test: add unit tests for export-report helpers#272
TerminalGravity wants to merge 3 commits into
mainfrom
test/export-report-unit-tests

Conversation

@TerminalGravity

Copy link
Copy Markdown
Collaborator

Exports computeStats, formatPeriodLabel, getDateRange from export-report.ts for testability. Adds 11 unit tests covering event counting, period labels, and date range computation. First tool-level test file — 54 total tests now passing.

- preflight-dev --help shows usage, quick start, and one-liner setup
- preflight-dev --version prints package version
- preflight-dev status checks .mcp.json, .preflight/ dir, and env vars
- Updated README with CLI commands section
Implements #5 - Generates structured markdown reports from timeline data
including activity summaries, prompt quality signals, daily breakdowns,
commit logs, and error/correction highlights.

Supports configurable time periods (24h/7d/30d), custom date ranges,
scope filtering, and optional verbose detail mode.
Export computeStats, formatPeriodLabel, getDateRange for testability.
Add 11 tests covering all event type counting, period label formatting,
and date range computation including edge cases.
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