Travis CI Jest Preset Reacting - Native Not Found

I got a responsive app.

Today I added unit tests with Jest and I connected Travis CI. When I run tests locally everything is fine. but when they run in Travis I get this error:

Validation Error: Preset react-native not found.

Thank.

+3


source to share


1 answer


I had this problem and even tried it on a new project.

enter image description here

I fixed it by deleting

"jest": {
        "preset": "react-native"
    }

      



from my .json package.

This allowed me to run npm run test

or jest

to run jest .

My guess (I may be wrong) is newer jest versions that don't need this configuration in the packages.json file.

+3


source







All Articles