Skip to content

Commit 906e8dd

Browse files
authored
fix: replace setTimeout with queueMicrotask to prevent Vitest deadlock (#571)
Closes #565
1 parent 72d1f31 commit 906e8dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/testing-library/src/lib/testing-library.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ async function waitForWrapper<T>(
589589
}
590590

591591
return await dtlWaitFor(() => {
592-
setTimeout(() => detectChanges(), 0);
592+
queueMicrotask(() => detectChanges());
593593
if (inFakeAsync) {
594594
tick(0);
595595
}

0 commit comments

Comments
 (0)