-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Epic: #11 (Epic 4: Edge Cases, Performance & Testing)
Type: Task
Priority: P0 (Critical)
Estimate: 2 days
Description
Write comprehensive unit tests for all new components and composables to achieve ≥80% code coverage.
Acceptance Criteria
- Unit tests for MoodIndicator component (TC-01 to TC-05)
- Unit tests for ArticleList component (TC-06 to TC-11)
- Unit tests for ArticleCard component (TC-12 to TC-16)
- Unit tests for useSentiment composable (API calls, caching)
- Unit tests for useTrendAnalysis composable (if extended)
- Code coverage ≥ 80%
- All tests pass in CI
Technical Notes
- Use Vitest (Nuxt's default test runner)
- Mount components with
@vue/test-utils - Mock API responses with
vi.mock() - Test accessibility: ARIA attributes, keyboard nav
- Test error states: loading, error, empty data
- Consider snapshot tests for visual regression
Dependencies
- Blocks: None (end of Epic 4)
- Blocked by: All Epic 1-3 implementation tasks
Test Coverage
- Test cases: TC-01 to TC-16
- Coverage report in CI
Related Files
tests/directory (create if not exists)- All component/composable files
package.json(add test scripts)
Part of Feature 004: Sentiment Detail Breakdown Page