https://github.com/nattatorn-dev/jest-expo
using jest to test expo
https://github.com/nattatorn-dev/jest-expo
Last synced: about 2 months ago
JSON representation
using jest to test expo
- Host: GitHub
- URL: https://github.com/nattatorn-dev/jest-expo
- Owner: nattatorn-dev
- Created: 2017-08-09T15:30:46.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-09T15:37:52.000Z (almost 8 years ago)
- Last Synced: 2025-03-29T05:38:06.650Z (about 2 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jest-expo
A [Jest](https://facebook.github.io/jest/) preset to painlessly test
your Expo apps.### Installation
- `yarn add jest-expo --dev` or `npm i jest-expo --save-dev`
- Add the following config to `package.json`:```js
"scripts": {
"test": "node_modules/jest/bin/jest.js"
},
"jest": {
"preset": "jest-expo"
}
```- Create a `__tests__` directory anywhere you like and a `Example-test.js` file inside of it, and add this code:
```js
it('works', () => {
expect(1).toBe(1);
});
```- Run `npm test` and it should pass
### Learning Jest
[Read the excellent documentation](https://facebook.github.io/jest/)