From 17b5781db603dd8eba98f32162f1a2ebad919a5c Mon Sep 17 00:00:00 2001 From: Daniele Esposti Date: Tue, 13 Dec 2016 19:42:19 +0000 Subject: [PATCH] Dont override config (#30) * Updated to Jest 17 * Do not override "config" node --- package.json | 6 +++--- src/index.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index c5e610a..8829607 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/index.js b/src/index.js index 88769dc..7928911 100644 --- a/src/index.js +++ b/src/index.js @@ -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) {