🔍 Exclude Generated Code and Mocks from Test Coverage #235
Labels
No labels
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
feeldata/feeldata.app#235
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
🎯 Problem Statement
Currently, our test coverage includes generated code and mock implementations, which inflates coverage metrics and doesn't reflect the actual quality of our hand-written code.
📋 Requirements
Code Types to Exclude from Coverage:
1. Generated Code
src/lib/generated/****/*.generated.{js,jsx,ts,tsx}2. Mock Implementations
**/__mocks__/**src/mocks/**tests/**/__mocks__/**3. Framework Boilerplate
layout.tsx,error.tsx,not-found.tsxpage.tsx(tested via E2E instead)4. Third-party Integration Code
src/vendor/**src/external/**🔧 Implementation Tasks
Phase 1: Update Jest Configuration
jest.config.base.tswith comprehensive exclusion patternsPhase 2: Update CI/CD Pipeline
.forgejo/workflows/test-coverage.ymlPhase 3: Documentation
✅ Success Criteria
📊 Expected Impact
🔗 Related Issues
📝 Notes
This follows industry best practices where:
Priority: High - Should be implemented before finalizing coverage targets