Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ferrannp/react-native-testing-example
Example of unit testing a React Native & Redux app using Jest (and Snapshots!)
https://github.com/ferrannp/react-native-testing-example
jest react react-native redux snapshot
Last synced: 3 months ago
JSON representation
Example of unit testing a React Native & Redux app using Jest (and Snapshots!)
- Host: GitHub
- URL: https://github.com/ferrannp/react-native-testing-example
- Owner: ferrannp
- Created: 2016-09-08T14:52:01.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-20T16:40:34.000Z (over 7 years ago)
- Last Synced: 2024-10-13T04:46:20.448Z (3 months ago)
- Topics: jest, react, react-native, redux, snapshot
- Language: JavaScript
- Homepage:
- Size: 148 KB
- Stars: 170
- Watchers: 9
- Forks: 42
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Native Testing Example
This is the example repo for:
1. [Unit testing React Native with the \*new\* Jest (I) — Snapshots come into play!](https://blog.callstack.io/unit-testing-react-native-with-the-new-jest-i-snapshots-come-into-play-68ba19b1b9fe#.o4ov5is9z)
2. [Unit testing React Native with the \*new\* Jest (II) — Redux: Snapshots for your actions and reducers](https://blog.callstack.io/unit-testing-react-native-with-the-new-jest-ii-redux-snapshots-for-your-actions-and-reducers-8559f6f8050b#.sdtb857so)## Try it out!
Install dependencies:
```
$ npm install
```Run tests:
```
$ npm test
```You can also run them in watch mode:
```
$ npm test -- --watch
```In this mode, you can play changing the app behaviour, breaking the tests and fixing them!