I'm having a react-native app.
Today I added unit tests with Jest and I hooked up Travis CI. When I run the tests locally, everything is fine. but when they run in Travis, I get this error:
Validation Error: Preset react-native not found.
Thanks.
I had this issue and even tried it in a fresh project.
I fixed it by removing
"jest": {
"preset": "react-native"
}
from my package.json.
Doing this enabled me to run npm run test
or jest
to run jest.
My guess (i could be wrong) is newer versions of jest wont need that config in the packages.json file anymore.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With