MCPcopy Index your code
hub / github.com/simstudioai/sim / flush

Function flush

apps/sim/hooks/queries/unsubscribe.test.tsx:88–95  ·  view source on GitHub ↗

Flush pending microtasks and the macrotask queue (query observer scheduling) inside act().

()

Source from the content-addressed store, hash-verified

86
87/** Flush pending microtasks and the macrotask queue (query observer scheduling) inside act(). */
88async 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
97describe('useUnsubscribe', () => {
98 beforeEach(() => {

Callers 1

Calls 1

resolveMethod · 0.65

Tested by

no test coverage detected