https://github.com/takp/jest-hands-on
Jest hands on
https://github.com/takp/jest-hands-on
Last synced: 3 months ago
JSON representation
Jest hands on
- Host: GitHub
- URL: https://github.com/takp/jest-hands-on
- Owner: takp
- Created: 2017-07-23T00:43:41.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-23T00:43:54.000Z (almost 8 years ago)
- Last Synced: 2024-12-27T09:27:59.510Z (5 months ago)
- Language: JavaScript
- Size: 102 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jest-hands-on
- [Jest](https://facebook.github.io/jest/)
## Run
Use [create-react-app](https://github.com/facebookincubator/create-react-app)
```
$ yarn global add create-react-app
$ create-react-app jest_hands_on
```Redux
```bash
$ yarn add redux
$ yarn add redux-thunk
$ yarn add redux-mock-store --dev
```Run tests
```bash
$ yarn test
```=>
```
PASS src/App.test.js
PASS src/sample/test/render.test.js
PASS src/__tests__/sample.js
● Consoleconsole.log src/__tests__/sample.js:5
beforeAll
console.log src/__tests__/sample.js:8
beforeEach
console.log src/__tests__/sample.js:8
beforeEachPASS src/sample/test/mockSample.test.js
Test Suites: 4 passed, 4 total
Tests: 5 passed, 5 total
Snapshots: 1 passed, 1 total
Time: 4.222s
Ran all test suites.
```## Ref
- [RailsプログラマのためのReact + Redux TDD Jest編 rito](https://chimame.github.io/slides/React_and_Redux_RailsProgrammer/slides/#/)
- [Jest](https://facebook.github.io/jest/)
- [Github - Jest](https://github.com/facebook/jest)