diff --git a/babel-jest-test.js b/babel-jest-test.js deleted file mode 100644 index afe6402c0..000000000 --- a/babel-jest-test.js +++ /dev/null @@ -1,4 +0,0 @@ -const babelJest = require('babel-jest'); -const babelRc = JSON.parse(require('fs').readFileSync(__dirname + '/.babelrc', 'utf8')); - -module.exports = babelJest.createTransformer(babelRc); diff --git a/jest.config.js b/jest.config.js index 65e1215c0..30774118e 100644 --- a/jest.config.js +++ b/jest.config.js @@ -24,6 +24,6 @@ module.exports = { '!**/coverage/lcov-report/**', ], transform: { - '^.+\\.jsx?$': path.join(__dirname, '/babel-jest-test'), + '^.+\\.jsx?$': path.join(__dirname, '/lib/babel-jest'), }, }; diff --git a/lib/babel-jest.js b/lib/babel-jest.js new file mode 100644 index 000000000..462b18fd9 --- /dev/null +++ b/lib/babel-jest.js @@ -0,0 +1,5 @@ +const babelJest = require('babel-jest'); +const path = require('path'); +const babelRc = JSON.parse(require('fs').readFileSync(path.join(__dirname, '..', '.babelrc'), 'utf8')); + +module.exports = babelJest.createTransformer(babelRc);