Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
v0.3.7: using gulp-jest 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alansouzati committed Sep 2, 2016
1 parent f0e4871 commit 2df1253
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 33 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grommet-toolbox",
"version": "0.3.6",
"version": "0.3.7",
"main": "lib/index.js",
"description": "Developer Environment for Grommet applications",
"authors": [
Expand Down Expand Up @@ -38,7 +38,7 @@
"gulp-eslint": "^2.0.0",
"gulp-file": "^0.3.0",
"gulp-if": "^2.0.0",
"gulp-jest": "https://github.com/alansouzati/gulp-jest/tarball/UPDATED_GULP_JEST",
"gulp-jest": "^0.5.0",
"gulp-open": "^2.0.0",
"gulp-rsync": "0.0.6",
"gulp-sass-lint": "^1.2.0",
Expand Down
69 changes: 38 additions & 31 deletions src/gulp-tasks-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,23 @@ export function testTasks (gulp, opts) {
return gulp.src(options.testPaths)
.pipe(gulpif(!watch, envs))
.pipe(jest({
modulePathIgnorePatterns: [
"<rootDir>/dist/",
"<rootDir>/templates/"
],
testPathIgnorePatterns: options.testPaths.filter(
(path) => path.startsWith('!')
).map((path) => path.substring(1)),
rootDir: options.base || process.cwd(),
watch: watch,
verbose: true
config: {
modulePathIgnorePatterns: [
"<rootDir>/dist/",
"<rootDir>/templates/"
],
testPathIgnorePatterns: options.testPaths.filter(
(path) => path.startsWith('!')
).map((path) => path.substring(1)),
rootDir: options.base || process.cwd(),
verbose: true
}
}))
.on('error', (error) => {
gutil.log(error.message);
process.exit(1);
if (!watch) {
process.exit(1);
}
})
.pipe(gulpif(!watch, envs.reset));
}
Expand All @@ -49,15 +52,17 @@ export function testTasks (gulp, opts) {
return gulp.src(options.testPaths)
.pipe(gulpif(!watch, envs))
.pipe(jest({
modulePathIgnorePatterns: [
"<rootDir>/dist/",
"<rootDir>/templates/"
],
testPathIgnorePatterns: options.testPaths.filter(
(path) => path.startsWith('!')
).map((path) => path.substring(1)),
rootDir: options.base || process.cwd(),
updateSnapshot: true
config: {
modulePathIgnorePatterns: [
"<rootDir>/dist/",
"<rootDir>/templates/"
],
testPathIgnorePatterns: options.testPaths.filter(
(path) => path.startsWith('!')
).map((path) => path.substring(1)),
rootDir: options.base || process.cwd(),
updateSnapshot: true
}
}))
.on('error', (error) => {
gutil.log(error.message);
Expand All @@ -81,17 +86,19 @@ export function testTasks (gulp, opts) {
return gulp.src(options.testPaths)
.pipe(envs)
.pipe(jest({
collectCoverageFrom: options.jsAssets,
collectCoverage: true,
coverageReporters: ['lcov'],
modulePathIgnorePatterns: [
"<rootDir>/dist/",
"<rootDir>/templates/"
],
testPathIgnorePatterns: options.testPaths.filter(
(path) => path.startsWith('!')
).map((path) => path.substring(1)),
rootDir: options.base || process.cwd()
config: {
collectCoverageFrom: options.jsAssets,
collectCoverage: true,
coverageReporters: ['lcov'],
modulePathIgnorePatterns: [
"<rootDir>/dist/",
"<rootDir>/templates/"
],
testPathIgnorePatterns: options.testPaths.filter(
(path) => path.startsWith('!')
).map((path) => path.substring(1)),
rootDir: options.base || process.cwd()
}
}))
.on('error', (error) => {
gutil.log(error.message);
Expand Down

0 comments on commit 2df1253

Please sign in to comment.