This guide is only relevant if you're running Cavy with cavy-cli.
By default, Cavy looks for an
index.js entry point in your React Native project.
cavy init will generate a corresponding
which is used to make sure that your tests only run
when booting your app via Cavy.
Setting up a custom entry point
If your app uses a different entry point, you will need to rename the
index.test.js file so that it is the same as your
entry point, but suffixed with
.test.js. For example, if your app entry point
index.ios.js, your test entry point should be called
To run your tests with a custom app entry point, run the test commands with the
--file flag, followed by the filename as a string. For example:
cavy run-ios --file index.ios.js
If you're using any extra React Native CLI options, make sure to include them
after the cavy-cli