Improve application responsiveness and background processing
This commit is contained in:
@@ -43,6 +43,8 @@ describe('visible page polling', () => {
|
||||
stop = pollVisible(task, 1000, false);
|
||||
expect(task).not.toHaveBeenCalled();
|
||||
await vi.advanceTimersByTimeAsync(2000);
|
||||
expect(task).toHaveBeenCalledTimes(1);
|
||||
await vi.advanceTimersByTimeAsync(1000);
|
||||
expect(task).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user