Commit 7f13da9
test(notifications): make ApiClient mock constructable for vitest 4 (#570)
The Notifications service test landed after the vitest-4 mock migration, so
it still mocked ApiClient with an arrow function:
`vi.mocked(ApiClient).mockImplementation(() => mockApiClient ...)`. Vitest 4
constructs mock implementations via the function's [[Construct]] slot, which
arrow functions lack, so `new ApiClient(...)` in the service constructor threw
`() => ... is not a constructor` and the suite failed to run.
Converted to a constructable regular function, matching every other service
test. Full unit suite (1992 tests) passes on vitest 4.1.9.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 7381d26 commit 7f13da9
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments