Testing your Mobile App
It's always important to ensure everything is working properly and that's why tests are great. We have unit and e2e tests on this project.

How to inspect the app

We use Reactotron to inspect logs, redux state, redux-sagas, HTTP requests, etc.

Unit tests

We use Jest and Storybook on our tests.

Storybook

Storybook is a tool for developing UI Components and has some plugins to make Jest generate snapshots of them.
On the root of the project, comment everything leaving only the last import to Storybook left and refresh your project. You'll see some tests like this:

Jest

We use Jest for our unit tests and to generate Storybook snapshots. We have a pre-commit hook enforcing preventing commits that breaks any test.
To check for test issues on your code, run this on your terminal:
1
yarn test
Copied!

E2E tests

We use Detox framework to end-to-end test our app and ensure everything is working properly.

Code style

We use ESLint to enforce code style and best practices. We have a pre-commit hook enforcing commits to follow our lint rules.
To check for lint issues on your code, run this on your terminal:
1
yarn lint
Copied!

Code formatting

We use Prettier to format the code style in our project. We have a pre-commit hook enforcing commits to follow our style guides.
To fix your code formatting issues, run this on your terminal:
1
yarn prettier
Copied!
Check this link to see how to integrate Prettier with your preferred code editor, and run Prettier when save your file for example.
Last modified 27d ago