test: ratchet coverage thresholds + fill tests/lib branch gaps (#107 P0) - #155
Merged
Conversation
Part 1: Bump vitest coverage thresholds from 55/65/75/55 to 67/74/82/67 (actuals minus ~3% buffer). Previous buffer was ~5%, tightened to ~3%. Part 2: Add libBranchGaps.test.js with 12 new test cases covering: - undoRedoHelpers.js L33-36: default parameter branches (71.42% → 100%) - dataCollectionHelpers.js: null/missing data, non-array tags, null classroom - scheduleListHelpers.js L59: lastModified falsy branch (96.66% → 100%) Overall branch coverage: 77.38% → 78.14% undoRedoHelpers branch: 71.42% → 100% scheduleListHelpers branch: 96.66% → 100% All 1154 tests pass. Thresholds pass. refs #107 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Agend-Agent: cb-team-impl Agend-Task: t-20260624113612576521-40473-30 Agend-Branch: test/107-p0-coverage-ratchet Agend-Issued-At: 2026-06-24T11:36:44.587554+00:00
Owner
Author
✅ VERIFIEDReviewed HEAD: Files Reviewed (2)
Fast Path Checklist
Evidence
|
This was referenced Jun 24, 2026
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.
What
Coverage threshold ratchet + branch gap fill for tests/lib helpers. Part of #107 Phase 2 P0.
Part 1: Threshold Ratchet
Bump vitest coverage thresholds to match current actuals minus ~3% buffer:
Part 2: Branch Gap Fill
New
tests/unit/libBranchGaps.test.js(12 tests) covering:undoRedoHelpers.js (71.42% → 100% branch) 🎉
onLoadState,onUpdateButtons,onCheckDirty,onUpdateCleanSnapshot)scheduleListHelpers.js (96.66% → 100% branch) 🎉
backendResult.lastModifiedfalsy branch — backend omits lastModified,scheduleLastModifiedshould not be updateddataCollectionHelpers.js (92.06% branch — improved but some gaps remain)
collectFromAllCourses: null schedules, missing data/scheduleData, null classroom, non-array day schedulegetGlobalAllTags: courses without tags, non-array tagsgetGlobalAllCourseNames: courses without namegetGlobalAllTeachers: courses without teacherChanged Files (2)
vitest.config.js(threshold update)tests/unit/libBranchGaps.test.js(new, 12 tests)Verification
npm test: 1154 tests passed (37 files) ✅npx vitest run --coverage: all thresholds pass ✅refs #107