(date = new Date(defaultDateStr))
| 10 | |
| 11 | // NOTE: Make sure to add `{ concurrent: false }` to all tests that use it! |
| 12 | function fakeNow(date = new Date(defaultDateStr)) { |
| 13 | now = date; |
| 14 | vi.useFakeTimers({ now }); |
| 15 | } |
| 16 | |
| 17 | afterEach(() => vi.useRealTimers()); |
| 18 |