test: Split test utilities to improve test times (#2622)

This commit is contained in:
Dermot Duffy
2026-07-26 16:29:53 -07:00
committed by GitHub
parent 8d44fcecf1
commit ad89aa9538
234 changed files with 2730 additions and 2516 deletions
+2 -2
View File
@@ -193,7 +193,7 @@ describe('runWhenIdleIfSupported', () => {
window.requestIdleCallback = requestIdle;
const func = vi.fn();
runWhenIdleIfSupported(func);
expect(requestIdle).toBeCalledWith(func, {});
expect(requestIdle).toHaveBeenCalledWith(func, {});
});
it('should run idle with timeout when supported', () => {
@@ -201,7 +201,7 @@ describe('runWhenIdleIfSupported', () => {
window.requestIdleCallback = requestIdle;
const func = vi.fn();
runWhenIdleIfSupported(func, 10);
expect(requestIdle).toBeCalledWith(func, { timeout: 10 });
expect(requestIdle).toHaveBeenCalledWith(func, { timeout: 10 });
});
});