I can’t seem to be able to run tests nor I can find any examples on how to test with jest and expo.
Could someone point me in the right direction?
I have this:
import { Text } from "react-native";
import React from "react";
import renderer from "react-test-renderer";
it("renders correctly", () => {
const tree = renderer.create(<Text>Snapshot test!</Text>).toJSON();
expect(tree).toMatchSnapshot();
});
but when I run the tests I get:
This is my package.json:
"scripts": {
"test": "node_modules/.bin/jest"
},
"jest": {
"preset": "jest-expo"
},
"devDependencies": {
"jest-expo": "^28.0.0"
}
...