Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 849 Bytes

File metadata and controls

25 lines (17 loc) · 849 Bytes

Use with create-react-app

This example demonstrates how to use jest-preview with create-react-app.

Setup jest with create-react-app

jest is setup with create-react-app by default, we don't need to do anything more

Installation and Usage

Please refer to Installation and Usage. Except for step 2 of installation: Create fileTransform.js:

// config/jest/fileTransform.js
const { processFileCRA } = require('jest-preview');

module.exports = {
  process(src, filename) {
    return processFileCRA(src, filename);
  },
};