Repository navigation
test(gui): add coverage baseline tests for logic layer - #56
Merged
Merged
Conversation
Set vitest coverage thresholds (lines/stmts 38%, fns 68%, branches 55%) and write 12 test files covering the pure-logic layer: - lib/retry - retry() + withRetry() with various failure modes - lib/recentFiles - localStorage CRUD, dedup, 10-item cap - lib/helicalValidation - all field validators + geometry hints - lib/streamFeedback - all connection/file/streaming/command namespaces - lib/commands - all 8 commands with schema-correct mock responses - lib/marlin-api - all invoke wrappers + event listeners - lib/fileOperations - all handler functions with dialog + command mocks - lib/numericFields - parseNumericInput + setFieldError - lib/menuConfig - MENU_DEFINITIONS structure assertions - stores/toastStore - addToast (auto-remove timer) + removeToast - types/project - type guards, getLayerData, createLayer - hooks/useDebouncedValue - debounce timing with fake timers Also add perf/reports/ to .gitignore (generated build artifact). Final coverage: lines 39.74%, fns 80.41%, branches 75.43%, stmts 39.74% All quality gates pass: ruff, mypy, pytest, tsc, stylelint, cargo fmt, clippy
CI (Linux v8) instruments ALL files matching the include glob, including all nested component subdirectories (canvas/, dialogs/, editors/, forms/, StreamTab/, contexts/, etc. - 60+ files total). Windows v8 only instruments files actually imported during tests (~35 files), producing inflated branch/function percentages that do not match CI reality. To get consistent CI/local behavior, add 'all: true' explicitly. The previous thresholds (functions: 68%, branches: 55%) were calibrated against the partial Windows file set. Honest CI baselines: CI functions: 44.44% => threshold 43% (1.44% headroom) CI branches: 27.98% => threshold 25% (2.98% headroom) CI lines: 46.91% => threshold 38% (8.91% headroom, no change) CI stmts: 47.04% => threshold 38% (9.04% headroom, no change)
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.
Set vitest coverage thresholds (lines/stmts 38%, fns 68%, branches 55%) and write 12 test files covering the pure-logic layer:
Also add perf/reports/ to .gitignore (generated build artifact).
Final coverage: lines 39.74%, fns 80.41%, branches 75.43%, stmts 39.74%
All quality gates pass: ruff, mypy, pytest, tsc, stylelint, cargo fmt, clippy