Skip to content

Commit 690b56a

Browse files
authored
fix flaky test
1 parent 76e3fe5 commit 690b56a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/actions/ReportTest.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ describe('actions/Report', () => {
7171

7272
beforeEach(() => {
7373
HttpUtils.xhr = originalXHR;
74-
const promise = Onyx.clear().then(jest.useRealTimers);
74+
const promise = Onyx.clear().then(() => {
75+
jest.useRealTimers();
76+
waitForBatchedUpdates();
77+
});
7578

7679
if (getIsUsingFakeTimers()) {
7780
// flushing pending timers

0 commit comments

Comments
 (0)