Skip to content

test: weekly coverage improvement 2026-04-19#70

Open
vayungodara wants to merge 3 commits into
mainfrom
test/coverage-2026-04-19
Open

test: weekly coverage improvement 2026-04-19#70
vayungodara wants to merge 3 commits into
mainfrom
test/coverage-2026-04-19

Conversation

@vayungodara

Copy link
Copy Markdown
Owner

Weekly Test Coverage

Automated PR from the Sunday coverage task.

What changed

  • 4 new test files: comments.test.js (14 tests), nudges.test.js (5 tests), email.test.js (6 tests), partnerships.test.js (20 tests)
  • 2 extended test files: streaks.test.js (+15 tests for formatDateInTimezone, getHourInTimezone, getActivityHeatmap), streaks-advanced.test.js (+14 tests for awardStreakFreeze, FREEZE_COOLDOWN_DAYS, getStreakFreezeStatus.nextFreezeEarned)
  • Mock infrastructure: Added .or() and .limit() chain methods to supabase-mock.js, unblocking partnerships.js (deferred for 2 weeks)
  • Coverage report at docs/reports/coverage-2026-04-19.md

Coverage improvement

Metric Before After Change
Statements 79.86% 90.31% +10.45%
Branches 69.44% 78.19% +8.75%
Functions 67.1% 79.2% +12.1%
Lines 83.33% 93.59% +10.26%

Tests: 187 → 261 (all passing)

Files newly covered

  • lib/comments.js — 0% → 100%
  • lib/nudges.js — 0% → 100%
  • lib/email.js — 0% → 95.23%
  • lib/partnerships.js — 0% → 94.16%
  • lib/streaks.js — 49% → 89.62%
  • lib/streaks-advanced.js — 84% → 88.09%

Test results

All 261 tests pass. See the coverage report for detailed before/after metrics.

Scope

Tests follow the existing Vitest + happy-dom conventions in tests/unit/lib/. React components, context providers, and animation presets are out of scope for this task.

https://claude.ai/code/session_017yKgptxfHFsHf8skX9ighV

- New tests: comments.js (14), nudges.js (5), email.js (6), partnerships.js (20)
- Extended: streaks.js (+15), streaks-advanced.js (+14)
- Updated supabase-mock with .or() and .limit() chain methods
- Coverage: 79.86% → 90.31% statements, 69.44% → 78.19% branches
- All 261 tests pass

Co-Authored-By: Claude Scheduled Task <noreply@anthropic.com>

https://claude.ai/code/session_017yKgptxfHFsHf8skX9ighV
@vercel

vercel Bot commented Apr 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lockin Ready Ready Preview, Comment Apr 19, 2026 8:23am

toLocaleString with hour12:false returns 24 for midnight on some
Node/ICU builds (CI) vs 0 locally. Use modulo to accept both.

https://claude.ai/code/session_017yKgptxfHFsHf8skX9ighV
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.

2 participants