Skip to content

Commit

Permalink
Dont override config (#30)
Browse files Browse the repository at this point in the history
* Updated to Jest 17

* Do not override "config" node
  • Loading branch information
expobrain authored and alansouzati committed Dec 13, 2016
1 parent de03f62 commit 17b5781
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
},
"homepage": "https://github.com/alansouzati/gulp-jest",
"dependencies": {
"jest-cli": "^16.0.0",
"jest-cli": "^17.0.0",
"gulp-util": "^3.0.0",
"through2": "^2.0.1"
},
"devDependencies": {
"babel-core": "^6.1.18",
"babel-jest": "^15.0.0",
"babel-cli": "^6.18.0",
"babel-jest": "^17.0.0",
"babel-plugin-transform-object-rest-spread": "^6.3.13",
"babel-preset-es2015": "^6.1.18",
"babel-preset-react": "^6.1.18",
Expand Down
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import through2 from 'through2';

export default (options = {}) => {
return through2.obj((file, enc, cb) => {
options = Object.assign({
config: {
options = Object.assign({}, options, {
config: Object.assign({
rootDir: file ? file.path : undefined
}
}, options);
}, options.config)
});

jest.runCLI(options, options.config.rootDir, (result) => {
if(result.numFailedTests) {
Expand Down

0 comments on commit 17b5781

Please sign in to comment.