# jest-transform-stub

> Jest transform stub

Latest version **2.0.0** (published 2019-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install jest-transform-stub
pnpm add jest-transform-stub
yarn add jest-transform-stub
bun add jest-transform-stub
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-02-03 |
| First published | 2018-02-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 115 |
| Author | Edd Yerburgh |
| Maintainers | eddyerburgh |
| Keywords | jest |

## Links

- npm: https://www.npmjs.com/package/jest-transform-stub
- Repository: https://github.com/eddyerburgh/jest-transform-stub
- Homepage: https://github.com/eddyerburgh/jest-transform-stub#readme
- Issues: https://github.com/eddyerburgh/jest-transform-stub/issues
- npm.io page: https://npm.io/package/jest-transform-stub

## Recent versions

- 2.0.0 (latest) — 2019-02-03
- 1.0.0 — 2018-02-27

## README

# jest-transform-stub

Jest doesn't handle non JavaScript assets by default.

You can use this module to avoid errors when importing non JavaScript assets.

## Usage

```shell
npm install --save-dev jest-transform-stub
```

In your Jest config, add jest-transform-stub to transform non JavaScript assets you want to stub:

```js
{
  "jest": {
    // ..
    "transform": {
      "^.+\\.js$": "babel-jest",
      ".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "jest-transform-stub"
    }
  }
}
```

## FAQ

**My module isn't being transformed**

Jest doesn't apply transforms to node_modules by default. You can solve this by using `moduleNameMapper`:

```js
{
  "jest": {
    // ..
    "moduleNameMapper": {
      "^.+.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "jest-transform-stub"
    }
  }
}
```

---
_Source: https://npm.io/package/jest-transform-stub · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
