Back to Facebook Developer Docs

@react-native/jest-preset

packages/jest-preset/README.md

0.87.0970 B
Original Source

@react-native/jest-preset

Jest preset for React Native apps.

Usage

Installation

Install @react-native/jest-preset in your app:

with npm:

sh
npm i @react-native/jest-preset --save-dev

or with yarn:

sh
yarn add -D @react-native/jest-preset

Configuring Jest

Then, create a file called jest.config.js in your project's root directory. Then load this preset:

module.exports = {
  preset: '@react-native/jest-preset',
};

You can further customize your Jest configuration by specifying other options. See Jest's jest.config.js documentation to learn more.