Search code examples
react-nativereact-native-iosdetox

Changing app entry point with Detox and React Native


I would like to find out what the least evasive way is to change an app entry point for Detox testing in React Native?

For example, I would like to use Detox for Component testing and would like to skip the login flow of our app and directly launch the component I'm testing.

I suppose I could create a test App.js and manually change it to load that in the App.Registry for testing but there may be a better way.


Solution

  • Mock your entry point to a different one. You can follow our guide:

    https://github.com/wix/Detox/blob/master/docs/Guide.Mocking.md