Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 2 months ago
JSON representation

Example of unit testing a React Native & Redux app using Jest (and Snapshots!)

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!