Skip to content

Commit 788081c

Browse files
committed
[chore] Stabilize flaky unit tests
1 parent 50d8210 commit 788081c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/ra-core/src/dataProvider/useDeleteMany.spec.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,10 @@ describe('useDeleteMany', () => {
113113
expect(screen.queryByText('World')).not.toBeNull();
114114
expect(screen.queryByText('mutating')).not.toBeNull();
115115
});
116-
await waitFor(() => {
117-
expect(screen.queryByText('success')).not.toBeNull();
118-
expect(screen.queryByText('Hello')).toBeNull();
119-
expect(screen.queryByText('World')).not.toBeNull();
120-
expect(screen.queryByText('mutating')).toBeNull();
121-
});
116+
await screen.findByText('success');
117+
await screen.findByText('World');
118+
expect(screen.queryByText('Hello')).toBeNull();
119+
await waitFor(() => expect(screen.queryByText('mutating')).toBeNull());
122120

123121
expect(dataProvider.deleteMany).toHaveBeenCalledWith('posts', {
124122
ids: [1],

0 commit comments

Comments
 (0)