Reactアプリをテスト
At Facebook, we use Jest to test React applications.
セットアップ
Create React Appを使用したセットアップ
If you are new to React, we recommend using Create React App. It is ready to use and ships with Jest! You will only need to add react-test-renderer for rendering snapshots.
実行
- npm
- Yarn
- pnpm
- Bun
npm install --save-dev react-test-renderer
yarn add --dev react-test-renderer
pnpm add --save-dev react-test-renderer
bun add --dev react-test-renderer