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

This commit is contained in:
Dermot Duffy
2026-07-26 11:28:58 -07:00
committed by GitHub
parent a0fd464d23
commit 0c3d46ad3d
36 changed files with 1041 additions and 1207 deletions
+11 -3
View File
@@ -71,7 +71,11 @@ describe('thumbnail utilities', () => {
});
vi.stubGlobal(
'FileReader',
vi.fn(() => mockFileReader),
// The source calls `new FileReader()`, and a mock implementation must be
// callable with `new`, so it cannot be an arrow function.
vi.fn(function () {
return mockFileReader;
}),
);
createFetchThumbnailTask(
@@ -129,7 +133,9 @@ describe('thumbnail utilities', () => {
const mockFileReader = mock<FileReader>();
vi.stubGlobal(
'FileReader',
vi.fn(() => mockFileReader),
vi.fn(function () {
return mockFileReader;
}),
);
createFetchThumbnailTask(
@@ -166,7 +172,9 @@ describe('thumbnail utilities', () => {
});
vi.stubGlobal(
'FileReader',
vi.fn(() => mockFileReader),
vi.fn(function () {
return mockFileReader;
}),
);
createFetchThumbnailTask(