Files
iNaturalistReactNative/tests/jest.post-setup.js
Johannes Klein a618b6e870 Update react-native-testing-library to latest (#3044)
* Update package.json

* Update package-lock.json

* Update

* Update to v13

* Update package-lock.json

* Breaking change: remove extend-expect

* Latest version

* Update package-lock.json

* Breaking change: Removed Accessibility matcher

* Update Suggestions.test.js

* Update DisplayTaxonName.test.js

* Testing the same but differently phrased

* Not really needed to test this

And since not.toHaveTextContent stopped working I just remove it.

* Update useTaxonSearch.test.js

* Move broken tests into folders that are not run

* Only move single tests that are failing

* This does work after all

* Remove only single tests that are broken

* Only move failed tests

* Only move failed tests

* Only move failed tests

* Does not pass on CI only
2025-08-05 13:44:49 +02:00

13 lines
310 B
JavaScript

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();
} );
} );
} );