fix: exclude sleep.ts from coverage and add pre-push hook#48
Conversation
sleep.ts is always mocked in tests - on Linux bun reports 0% coverage for mocked modules, causing CI to fail the coverage threshold. Also adds a pre-push hook so coverage failures are caught locally.
|
Claude finished @adawalli's task in 1m 45s —— View job PR Review
LGTM overall. This is a minimal, well-scoped fix with solid reasoning.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
|
Claude finished @adawalli's task in 57s —— View job PR Review
LGTM. This is a clean, minimal fix with good reasoning.
|
Summary
bun test --coverageexits 1 despite all tests passingRoot cause
src/sleep.tsis always mocked viamock.module("../src/sleep", ...)in tests. On Linux (CI), bun reports 0% coverage for the real module, failing the 90% line coverage threshold. Locally on macOS the coverage tracking behaves differently, so it wasn't caught pre-push.src/stable-wait.tsis already in the ignore list for the same reason -src/sleep.tsbelongs there too.Changes
bunfig.toml- addsrc/sleep.tstocoveragePathIgnorePatterns.husky/pre-push- runbun test --coveragebefore every push