Work in progress, stay tuned.
Thin node.js mock of wix/react-native-navigation that makes it possible to write fast integration test including:
- rendering of screens
- life cycle methods
- navigation between screens
Uses:
Prerequisite
react-native
>= 0.49react
>= 16.0.0
Example usage with Jest
yarn add --dev react-native-navigation-mock-render jsdom@^11.5.1 enzyme@^3.3.0 enzyme-adapter-react-16@^1.1.1 react-native-mock-render@^0.0.19
/* @flow */ jest jest const wrapper = const flushAllPromises = : Promise<void>
Limitations
Still early stages. First focus is apps using startSingleScreenApp
.
Besides:
- not all
ScreenVisibilityListener
have been implemented - not all
Navigation
methods have been implemented (e.g.startTabBasedApp
,showContextualMenu
)
Contributing
To get started, run:
yarn
When developing:
yarn run lint
License
MIT