Repository navigation
Commit 864023e
Slideshow Management Fixes - Convert remaining window.confirm overrides to vi.spyOn.
Follow-up to Copilot review feedback on PR #23: the previous commit added
afterEach(() => vi.restoreAllMocks()) to the Slideshows and SlideshowDetail
test suites, but each file still had one pre-existing test mocking
window.confirm by direct assignment, which vi.restoreAllMocks() does not
restore. If such a test failed before its manual cleanup line, the mock
could leak into later tests and make the suites order-dependent.
Convert those two remaining tests ('handles delete slideshow' and 'handles
delete item') to vi.spyOn(window, 'confirm').mockReturnValue(true) and drop
their manual save/restore, so every window.confirm/window.prompt mock in
both suites is now a spy covered by the afterEach restore.
Full frontend suite passes (137 passed); type-check and lint clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ed52658 commit 864023e
2 files changed
Lines changed: 6 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
209 | | - | |
| 207 | + | |
| 208 | + | |
210 | 209 | | |
211 | 210 | | |
212 | 211 | | |
| |||
222 | 221 | | |
223 | 222 | | |
224 | 223 | | |
225 | | - | |
| 224 | + | |
226 | 225 | | |
227 | 226 | | |
228 | 227 | | |
229 | 228 | | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | 229 | | |
234 | 230 | | |
235 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
148 | | - | |
| 146 | + | |
| 147 | + | |
149 | 148 | | |
150 | 149 | | |
151 | 150 | | |
| |||
161 | 160 | | |
162 | 161 | | |
163 | 162 | | |
164 | | - | |
| 163 | + | |
165 | 164 | | |
166 | 165 | | |
167 | 166 | | |
168 | 167 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | 168 | | |
173 | 169 | | |
174 | 170 | | |
| |||
0 commit comments