# gulp-jest

> Gulp plugin for running your Jest tests

Latest version **4.0.4** (published 2021-04-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-jest
pnpm add gulp-jest
yarn add gulp-jest
bun add gulp-jest
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.0.4 |
| Published | 2021-04-09 |
| First published | 2014-08-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 52 |
| Maintainers | dakuan, alansouzati, aarontrank |
| Keywords | gulpplugin, jest, test, testing, unit, framework, runner, tdd, bdd, qunit, spec, tap |

## Links

- npm: https://www.npmjs.com/package/gulp-jest
- Repository: https://github.com/aarontrank/gulp-jest
- Issues: https://github.com/aarontrank/gulp-jest/issues
- npm.io page: https://npm.io/package/gulp-jest

## Dependencies (2)

- [through2](https://npm.io/package/through2.md) ^3.0.1
- [plugin-error](https://npm.io/package/plugin-error.md) ^1.0.1

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 4.0.4 (latest) — 2021-04-09
- 4.0.3 — 2019-08-14
- 4.0.2 — 2018-03-01
- 4.0.1 — 2018-03-01
- 4.0.0 — 2018-03-01
- 3.0.1 — 2017-11-02
- 3.0.0 — 2017-11-02
- 2.0.0 — 2017-05-31
- 1.0.0 — 2017-01-04
- 0.6.3 — 2016-12-13
- 0.6.2 — 2016-12-13
- 0.6.1 — 2016-12-13
- 0.6.0 — 2016-10-28
- 0.5.2 — 2016-09-02
- 0.5.1 — 2016-09-02
- … 8 more at https://npm.io/package/gulp-jest/versions

## README

[![Build Status](https://travis-ci.org/aarontrank/gulp-jest.svg?branch=master)](https://travis-ci.org/aarontrank/gulp-jest)
[![Code Climate](https://codeclimate.com/github/aarontrank/gulp-jest/badges/gpa.svg)](https://codeclimate.com/github/aarontrank/gulp-jest)
[![Test Coverage](https://codeclimate.com/github/aarontrank/gulp-jest/badges/coverage.svg)](https://codeclimate.com/github/aarontrank/gulp-jest/coverage)

# [gulp](http://gulpjs.com)-jest

Gulp plugin for the Jest test library

## Installation

```bash
$ npm install gulp-jest jest
```

## Usage

```javascript
var jest = require('gulp-jest').default;

gulp.task('jest', function () {
  return gulp.src('__tests__').pipe(jest({
    "preprocessorIgnorePatterns": [
      "<rootDir>/dist/", "<rootDir>/node_modules/"
    ],
    "automock": false
  }));
});

```

## `process.env.NODE_ENV`

Unlike the `jest` CLI tool, `gulp-jest` does not automatically set `process.env.NODE_ENV` 
to be `test`. If you are using Webpack or Babel, you may need to manually set `process.env.NODE_ENV`
prior to running the task itself.

```javascript
gulp.task('jest', function () {
  process.env.NODE_ENV = 'test';
  
  return gulp.src('__tests__').pipe(jest({
    ...
  }));
});
```

## API

### jest(options)

#### options

as per [Jest config](http://facebook.github.io/jest/docs/configuration.html)

## License

MIT © [Dominic Barker](http://www.dombarker.co.uk)

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