Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
gulp.task('test', () => {
return gulp
.src('__tests__')
.pipe(jest({
config: {
testPathPattern: /.\/__tests__\/.*-test.js/
// "preprocessorIgnorePatterns": [
// "/dist/", "/node_modules/"
// ],
// "automock": false
}
}));
});
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,
})
);
}
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));
}
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,
},
}
)
)
);
});
gulp.task('jest', done => {
return gulp
.src('')
.on('error', function(err) {
done(err);
})
.pipe(jest({}));
});
gulp.task('test', ['compile'], () => {
let jest = require('gulp-jest').default
return gulp.src('test/').pipe(jest())
})
gulp.task('test', function () {
gulp.src(['spec/**/*.js'])
.pipe(jest({
"preprocessorIgnorePatterns": [
"/dist/", "/node_modules/"
],
"automock": false
}));
});
gulp.task('jest', () => {
return gulp.src('./').pipe(jest({
automock: false,
coverageDirectory: './coverage/',
collectCoverage: true,
collectCoverageFrom: [
'**/generators/**/*.js',
'!**/node_modules/**',
'!**/templates/**'
],
testMatch: [
'**/__tests__/**/*.js'
]
}));
});
async () => gulp.src("./src", { read: false }).pipe(
jest(Object.assign({}, jestBaseConfig, extraSettings))
)
);
gulp.task('test', function() {
gulp.src('__tests__')
.pipe(jest({
scriptPreprocessor: '../preprocessor.js',
unmockedModulePathPatterns: [
'./node_modules/react',
'./node_modules/semver'
],
moduleFileExtensions: [
"js"
]
}));
});