Facebookでは、Jestを使用して React Native アプリケーションをテストします。 動く React Native アプリケーションのテストに関するより深い知見は以下のシリーズを読むことで得てください: Part 1: Jest – Snapshot come into play、Part 2: Jest – Redux Snapshots for your Actions and Reducers セットアップ react-native 0.38 より react-native init コマンドに Jest セットアップがデフォルトで含まれています。 以下の設定が自動的に package.json ファイルに追加されます。 { "scripts": { "test": "jest" }, "jest": { "preset": "react-native" } }
![React Nativeアプリをテスト · Jest](https://cdn-ak-scissors.b.st-hatena.com/image/square/143beb707842fe84419c3322c65732188855db42/height=288;version=1;width=512/https%3A%2F%2Fjestjs.io%2Fja%2Fimg%2Fopengraph.png)