Flush pending microtasks and the macrotask queue (query observer scheduling) inside act().
()
| 86 | |
| 87 | /** Flush pending microtasks and the macrotask queue (query observer scheduling) inside act(). */ |
| 88 | async function flush() { |
| 89 | await act(async () => { |
| 90 | for (let i = 0; i < 5; i++) { |
| 91 | await Promise.resolve() |
| 92 | await new Promise((resolve) => setTimeout(resolve, 0)) |
| 93 | } |
| 94 | }) |
| 95 | } |
| 96 | |
| 97 | describe('useUnsubscribe', () => { |
| 98 | beforeEach(() => { |
no test coverage detected