Skip to content

Commit 1b80acc

Browse files
committed
fix leaking test
1 parent d2cd2e2 commit 1b80acc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/ra-core/src/controller/list/useListController.spec.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
screen,
88
act,
99
} from '@testing-library/react';
10+
import { onlineManager } from '@tanstack/react-query';
1011
import { testDataProvider } from '../../dataProvider';
1112
import { memoryStore } from '../../store';
1213
import { CoreAdminContext } from '../../core';
@@ -35,6 +36,10 @@ describe('useListController', () => {
3536
debounce: 200,
3637
};
3738

39+
beforeEach(() => {
40+
onlineManager.setOnline(true);
41+
});
42+
3843
describe('queryOptions', () => {
3944
it('should accept custom client query options', async () => {
4045
jest.spyOn(console, 'error').mockImplementationOnce(() => {});

0 commit comments

Comments
 (0)