Gulp plugin for running your Jest tests
npm install gulp-jest


Gulp plugin for the Jest test library
``bash`
$ npm install gulp-jest jest
`javascript
var jest = require('gulp-jest').default;
gulp.task('jest', function () {
return gulp.src('__tests__').pipe(jest({
"preprocessorIgnorePatterns": [
"
],
"automock": false
}));
});
`
Unlike the jest CLI tool, gulp-jest does not automatically set process.env.NODE_ENV test
to be . 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({
...
}));
});
#### options
as per Jest config
MIT © Dominic Barker