test: add unit tests for export-report helpers - #272
Open
TerminalGravity wants to merge 3 commits into
Open
Conversation
- 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.
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.
Exports
computeStats,formatPeriodLabel,getDateRangefrom 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.