Skip to content

Latest commit

 

History

History
108 lines (78 loc) · 2.25 KB

File metadata and controls

108 lines (78 loc) · 2.25 KB

Testing Documentation

🧪 Quick Commands

See TESTING-README.md in root for full command reference.

npm test              # Jest unit tests
npm run test:e2e      # Playwright E2E tests
npm run test:coverage # Coverage report

📖 Testing Strategy

We use two complementary testing frameworks:

Jest (Unit & Integration)

  • ✅ Fast tests (milliseconds)
  • ✅ Isolated component testing
  • ✅ Code coverage tracking
  • ✅ Mock external dependencies

Playwright (End-to-End)

  • ✅ Real browser testing
  • ✅ Full user flows
  • ✅ Cross-browser support
  • ✅ Visual regression

📚 Documentation Index

Essential Reading (Start Here)

  1. Jest vs Playwright (~10 min)

    • When to use which framework
    • Decision tree and best practices
  2. Testing Guide (~8 min)

    • How to write tests
    • File naming conventions
    • Testing patterns
  3. Testing Strategy (~7 min)

    • Overall testing approach
    • Coverage goals

Reference (As Needed)

  1. Manual Test Scenarios - Manual testing checklist
  2. Test Cleanup Summary - What was fixed
  3. E2E Test Analysis - Playwright status

📊 Current Status (Oct 7, 2025)

Jest Tests

✅ 54 passing tests
⏭️  11 skipped tests (documented)
❌ 0 failures
📈 42% statement coverage
📈 57% branch coverage

Playwright Tests

✅ 2 passing (theme toggle)
⏭️  2 skipped
⚠️  Some tests need implementation

🎯 When to Use Which Test?

Scenario Use Jest Use Playwright
Component renders
Props handling
State updates
Full user flow
Cross-browser
Navigation

Rule: 80% Jest (fast), 20% Playwright (critical flows)


🐛 Debugging

Jest

npm test -- --verbose

Playwright

npx playwright test --ui      # UI mode (recommended)
npx playwright test --debug   # Debug mode

See jest-vs-playwright.md for detailed comparison.