1.0.5 • Published 3 months ago

@jgoz/jest-esbuild v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

@jgoz/jest-esbuild

An esbuild transform for Jest that supports mock hoisting.

Features

Install

$ npm i @jgoz/jest-esbuild

Usage

Add it to your jest config:

{
  "transform": {
    "^.+\\.tsx?$": ["@jgoz/jest-esbuild"]
  }
}

Or with options:

{
  "transform": {
    "^.+\\.tsx?$": [
      "@jgoz/jest-esbuild",
      {
        "esbuild": {
          "jsx": "automatic",
          "target": "es2017"
        }
      }
    ]
  }
}

Options

NameTypeDefaultDescription
esbuildTransformOptions-Esbuild transform options.
hoistMatchstring[]testMatchAlternate glob patterns for files that should be transformed with Babel for mock hoisting. If specified, only files matching this pattern will be transformed with Babel after being transformed with esbuild.
1.0.5

3 months ago

1.0.4

10 months ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago