How to use the gulp-jest.default function in gulp-jest

To help you get started, we’ve selected a few gulp-jest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github codeBelt / StructureJS / Gulpfile.js View on Github external
gulp.task('test', () => {
    return gulp
        .src('__tests__')
        .pipe(jest({
            config: {
                testPathPattern: /.\/__tests__\/.*-test.js/
                // "preprocessorIgnorePatterns": [
                //     "/dist/", "/node_modules/"
                // ],
                // "automock": false
            }
        }));
});
github ampproject / amphtml / build-system / tasks / babel-plugin-tests.js View on Github external
function babelPluginTests() {
  return gulp.src('./build-system/babel-plugins/testSetupFile.js').pipe(
    jest({
      'testRegex': '/babel-plugins/[^/]+/test/.+\\.m?js$',
      'testPathIgnorePatterns': ['/node_modules/'],
      'testEnvironment': 'node',
      'transformIgnorePatterns': ['/node_modules/'],
      'coveragePathIgnorePatterns': ['/node_modules/'],
      'modulePathIgnorePatterns': ['/test/fixtures/', '/build/'],
      'reporters': [
        isTravisBuild() ? 'jest-silent-reporter' : 'jest-dot-reporter',
      ],
      'automock': false,
    })
  );
}
github moment / luxon / gulpfile.js View on Github external
function test(includeCoverage) {
  const opts = {
    collectCoverage: includeCoverage,
    coverageDirectory: 'build/coverage',
    collectCoverageFrom: ['src/**', '!src/zone.js', '!src/luxonFilled.js'],
    ci: !!process.env.CI
  };

  if (process.env.LIMIT_JEST) {
    opts.maxWorkers = 4;
  }

  return gulp.src('test').pipe(jest(opts));
}
github tabwrangler / tabwrangler / gulpfile.js View on Github external
gulp.task('test', function() {
  process.env.NODE_ENV = 'test';
  return gulp.src('app/js/__tests__').pipe(
    jest(
      Object.assign(
        {},
        {
          config: {
            transformIgnorePatterns: ['/dist/', '/node_modules/'],
            transform: {
              '^.+\\.jsx?$': 'babel-jest',
            },
            verbose: true,
            automock: false,
          },
        }
      )
    )
  );
});
github DAVFoundation / dav-js / gulpfile.js View on Github external
gulp.task('jest', done => {
  return gulp
    .src('')
    .on('error', function(err) {
      done(err);
    })
    .pipe(jest({}));
});
github postcss / postcss-safe-parser / gulpfile.js View on Github external
gulp.task('test', ['compile'], () => {
  let jest = require('gulp-jest').default
  return gulp.src('test/').pipe(jest())
})
github arabyalhomsi / larajs-validator / gulpfile.js View on Github external
gulp.task('test', function () {
  gulp.src(['spec/**/*.js'])

  .pipe(jest({
    "preprocessorIgnorePatterns": [
      "/dist/", "/node_modules/"
    ],
    "automock": false
  }));
});
github Eskalol / generator-swagger-es-6 / gulpfile.js View on Github external
gulp.task('jest', () => {
  return gulp.src('./').pipe(jest({
    automock: false,
    coverageDirectory: './coverage/',
    collectCoverage: true,
    collectCoverageFrom: [
      '**/generators/**/*.js',
      '!**/node_modules/**',
      '!**/templates/**'
    ],
    testMatch: [
      '**/__tests__/**/*.js'
    ]
  }));
});
github ascartabelli / lamb / gulpfile.js View on Github external
async () => gulp.src("./src", { read: false }).pipe(
        jest(Object.assign({}, jestBaseConfig, extraSettings))
    )
);
github jubianchi / semver-check / gulpfile.js View on Github external
gulp.task('test', function() {
    gulp.src('__tests__')
        .pipe(jest({
            scriptPreprocessor: '../preprocessor.js',
            unmockedModulePathPatterns: [
                './node_modules/react',
                './node_modules/semver'
            ],
            moduleFileExtensions: [
                "js"
            ]
        }));
});

gulp-jest

Gulp plugin for running your Jest tests

MIT
Latest version published 4 years ago

Package Health Score

54 / 100
Full package analysis

Popular gulp-jest functions