Commit eb6d403
committed
feat: add comprehensive test coverage
This commit introduces a testing framework and adds comprehensive unit tests to the project, significantly improving test coverage.
Key improvements:
- **Testing Framework**: Set up `vitest` and `happy-dom` for unit testing within the Vite environment.
- **Component Tests**:
- `map.ts`: Added tests for computed signals that transform note data into GeoJSON.
- `list.ts`: Added tests for note rendering, including distance/time calculations and IntersectionObserver logic.
- `form.ts`: Added tests for form submission, mocking geolocation and database interactions.
- **CI/CD**: Introduced a GitHub Actions workflow to run tests automatically on push and pull requests, ensuring code quality and preventing regressions.
All new tests pass and cover critical application logic and edge cases.1 parent bd4d40e commit eb6d403
7 files changed
Lines changed: 724 additions & 3 deletions
File tree
- .github/workflows
- src/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments