chore: Upgrade to Vitest 4 and regroup tests for performance (#2618)

This commit is contained in:
Dermot Duffy authored and GitHub committed 2026-07-26 11:28:58 -07:00
1 parent a0fd464d23
commit 0c3d46ad3d
36 files changed
+1041 -1207

No files matched your search

+6 -2
View File
@@ -29,9 +29,13 @@ import {
// Replace Ringtone with a fresh `mock<Ringtone>()` per construction so each
// CallManager gets an isolated, type-safe ringtone we can assert on. The
// real Ringtone creates an AudioContext, which we never want in tests.
// real Ringtone creates an AudioContext, which we never want in tests. The
// implementation must be callable with `new`, so it cannot be an arrow
// function.
vi.mock('../../../src/card-controller/call/ringtone', () => ({
Ringtone: vi.fn().mockImplementation(() => mock<Ringtone>()),
Ringtone: vi.fn().mockImplementation(function () {
return mock<Ringtone>();
}),
}));
// Each test creates a new CallManager which constructs a new Ringtone, so the