Commit e9b15b2
test: repair never-passable login tests and tighten the timer flush
The required password input blocks empty or cleared submissions
client-side, so the missing-password error and the rate limiter were
unreachable from the UI (the CI failure videos show the browser's native
validation bubble at the moment of the assertion):
- assert the native validation guard (input.password:invalid) for the
missing-password case and rename the test to match the actual behavior
- refill the password before every attempt in the rate limiter test so
all 15 attempts actually POST, and mark it test.slow() since each
attempt now costs a real argon2 hash
- replace the 3x Promise.resolve() microtask drain in heart.test.ts with
a single real-macrotask yield via jest.requireActual("timers")
.setImmediate, which drains the queue deterministically
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ec595ea commit e9b15b2
2 files changed
Lines changed: 8 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
124 | 121 | | |
125 | 122 | | |
126 | 123 | | |
| |||
0 commit comments