Files
iNaturalistReactNative/tests/jest.post-setup.js
Amanda Bullington cf70a4358a Move modules from jest setup to __mocks__ (#1949)
* Get a few mocks working in __mocks__ folder

* Move more mocks into __mocks__

* Move mocks

* Move zustand mock

* Add more mocks to __mocks__

* More mocks

* Move more files to __mocks__ and audit existing mocks

* Mock react navigation in __mocks__

* Restore test to help with imports after jest env torn down

* Add fake timer to integration test with userEvent

* Add RN paper mock
2024-08-11 11:27:52 -07:00

15 lines
364 B
JavaScript

import "@testing-library/jest-native/extend-expect";
import { act } from "@testing-library/react-native";
import * as mockZustand from "../__mocks__/zustand";
// Reset the Zustand state after every test. See also ../__mocks__/zustand.ts
afterEach( () => {
act( () => {
mockZustand.storeResetFns.forEach( resetFn => {
resetFn();
} );
} );
} );