Available with cavy-cli.
cavy init [<specFolderName>]
Set up testing with Cavy within your React Native project. Creates a
folder with an example spec in it, and an
index.test.js file, from which Cavy
will boot your app and run your specs.
<specFolderName>: The directory in which you'd like to keep your spec files. Defaults to
cavy run-ios [options] [rn-options]
Run tests on iOS.
-f, --file <file>: Specify the app entry point. By default, Cavy looks for an
-s, --skipbuild: Start the test server and listen for results without first building the app. Assumes your app is already running.
-d, --dev: Start the test server and keep it running until manually killed. For use with hot-reloading.
- Any react-native-cli options that are valid for
index.ios.js as the entry point:
cavy run-ios -f index.ios.js
Set a custom entry point and specify a device (see React Native: Running On Simulator):
cavy run-ios -f index.ios.js --simulator="iPhone 4s"
Run Cavy tests in dev mode having built and started your app independently:
cavy run-ios -d -s
If you choose not to skip the build, then Cavy CLI will build and run your app
react-native run-ios under the hood.
cavy run-android [options] [rn-options]
Run tests on Android.
Options are the same as for