mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Fixed flushing problem with tests
This commit is contained in:
@@ -18,11 +18,13 @@ export function act(callback: Function): void {
|
||||
});
|
||||
|
||||
// Flush Bridge operations
|
||||
actDOM(() => {
|
||||
actTestRenderer(() => {
|
||||
jest.runAllTimers();
|
||||
while (global.mockGetTimersCount() > 0) {
|
||||
actDOM(() => {
|
||||
actTestRenderer(() => {
|
||||
jest.runAllTimers();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export async function actAsync(
|
||||
|
||||
Reference in New Issue
Block a user