@sucrase/jest-plugin
    TypeScript icon, indicating that this package has built-in type declarations

    2.2.1 • Public • Published

    Sucrase Jest plugin

    npm version MIT License

    This is a simple Jest plugin that makes it easy to use Sucrase when running Jest tests.

    Usage

    First install the package as a dev dependency:

    yarn add --dev @sucrase/jest-plugin
    

    Then change the default transform in jest.config.js file:

      ...
      transform: { "\\.(js|jsx|ts|tsx)$": "@sucrase/jest-plugin" },
      ...
    

    Currently, the transforms are not configurable; it uses always runs the import and jest transforms and uses the file extension to decide whether to run the JSX, Flow, and/or TypeScript transforms.

    Keywords

    none

    Install

    npm i @sucrase/jest-plugin

    DownloadsWeekly Downloads

    31,626

    Version

    2.2.1

    License

    MIT

    Unpacked Size

    5.54 kB

    Total Files

    11

    Last publish

    Collaborators

    • alangpierce