mirror of
https://github.com/callumalpass/tasknotes.git
synced 2026-07-22 12:50:26 +00:00
The test was failing because getTodayString() uses the real system date, while the test was checking against a fixed test date (Oct 6, 2025). When run on any date after Oct 6, 2025, tasks due on Oct 6 would appear overdue, causing the test to fail incorrectly. Solution: Use jest.useFakeTimers() and jest.setSystemTime() to mock the system date to Oct 6, 2025 during these tests, ensuring consistent behavior regardless of when the tests are run. All 3 tests now pass correctly. |
||
|---|---|---|
| .. | ||
| __mocks__ | ||
| components | ||
| helpers | ||
| integration | ||
| manual | ||
| services | ||
| types | ||
| unit | ||
| utils | ||
| coverage-report.md | ||
| test-setup.ts | ||