Closed to4-yanagi closed 5 years ago
https://github.com/expo/jest-expo create-react-app標準でこれを使っているらしい (スター数少ない)
https://redux.js.org/recipes/writingtests
おおむねこれを参考に
Snapshot Testingとはなにか https://qiita.com/teufelj/items/2e2c18f099e95f215bec
スナップショットテストのすすめ https://qiita.com/kentt/items/c66fed793610e36de552
残り
http://enthudrives.com/blog/unit-testing-redux-containers/
コンテナのテスト enzymeやはり必要か
sagaのテスト、やはりこの記事は素晴らしい https://qiita.com/kuy/items/716affc808ebb3e1e8ac
redux-saga-test-planがあると更に楽になりそう。
https://github.com/jfairbank/redux-saga-test-plan https://blog.hiroppy.me/entry/2017/06/19/095956
containerのテストは色々な考え方があって難しいが 以下の2のやり方が一番しっくりくる。 https://jsramblings.com/2018/01/15/3-ways-to-test-mapStateToProps-and-mapDispatchToProps.html
以下の記事だとユニットテストの範疇超えてない?っていう批判もあるが、connectedcomponentsのテストと考えればギリセーフ感 https://qiita.com/wabisuke2718/items/64be60c9232966fabd83
テストで使う事になったnpmモジュール
あとは当然jest
残課題
テスト残課題
実装し、記事を記載したのでクローズ https://qiita.com/to4-yanagi/items/c2d4c94c50221e85b8f3
react-test-rendererが必要