Commit 9894921
committed
fix(api): stop fakeToday test helper from leaking frozen Date.now across files
The helper mutated the real Date constructor's static .now before swapping
globalThis.Date, so cleanup assigned to FakeDate.now instead of restoring
the real one. Subsequent test files saw Date.now() frozen at the last
fakeNow value, flipping isExpired() checks in api-key.test.ts when files
ran in a certain order in CI.1 parent ad7a719 commit 9894921
1 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 7 | + | |
11 | 8 | | |
12 | 9 | | |
13 | 10 | | |
| |||
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
22 | | - | |
23 | | - | |
| 19 | + | |
24 | 20 | | |
25 | 21 | | |
26 | 22 | | |
| |||
0 commit comments