From 7f1dc04eb93d735eca4e039a86182d17f79768ca Mon Sep 17 00:00:00 2001 From: E-Liang Tan Date: Wed, 29 Jul 2020 10:33:41 +0800 Subject: [PATCH] Fix transpilation of @elg/speedscope in tests See https://github.com/facebook/jest/issues/6229#issuecomment-403539460 --- .babelrc | 8 -------- babel.config.js | 5 +++++ jest.config.js | 4 ++++ 3 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 .babelrc create mode 100644 babel.config.js diff --git a/.babelrc b/.babelrc deleted file mode 100644 index aa1bd21..0000000 --- a/.babelrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "presets": [ - [ - "react-app", - { "absoluteRuntime": false, "flow": true, "typescript": false } - ] - ] -} diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..6640bf9 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,5 @@ +module.exports = { + presets: [ + ['react-app', {absoluteRuntime: false, flow: true, typescript: false}], + ], +}; diff --git a/jest.config.js b/jest.config.js index 30e44cb..4f08d90 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,4 +2,8 @@ module.exports = { moduleNameMapper: { '\\.css$': 'identity-obj-proxy', }, + transformIgnorePatterns: [ + // Pass @elg/speedscope through transforms + '/node_modules/(?!@elg/speedscope).+\\.js$', + ], };