We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f861244 commit 0536468Copy full SHA for 0536468
packages/toolkit/src/query/tests/apiProvider.test.tsx
@@ -32,6 +32,10 @@ const api = createApi({
32
}),
33
})
34
35
+afterEach(() => {
36
+ vi.resetAllMocks()
37
+})
38
+
39
describe('ApiProvider', () => {
40
test('ApiProvider allows a user to make queries without a traditional Redux setup', async () => {
41
function User() {
@@ -72,6 +76,8 @@ describe('ApiProvider', () => {
72
76
expect(getByTestId('isFetching').textContent).toBe('false')
73
77
74
78
test('ApiProvider throws if nested inside a Redux context', () => {
79
+ // Intentionally swallow the "unhandled error" message
80
+ vi.spyOn(console, 'error').mockImplementation(() => {})
75
81
expect(() =>
82
render(
83
<Provider store={configureStore({ reducer: () => null })}>
0 commit comments