diff --git a/babel-jest.config.js b/babel-jest.config.js new file mode 100644 index 0000000..61dfaad --- /dev/null +++ b/babel-jest.config.js @@ -0,0 +1,7 @@ +module.exports = { + presets: [ + '@babel/preset-env', + '@babel/preset-react', + ], +}; + diff --git a/jest.config.js b/jest.config.js index 9383774..35c45f2 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,7 +2,7 @@ module.exports = { testEnvironment: 'jsdom', moduleFileExtensions: ['js', 'jsx'], transform: { - '^.+\\.jsx?$': 'babel-jest', + '^.+\\.jsx?$': ['babel-jest', { configFile: './babel-jest.config.js' }], }, moduleNameMapper: { '\\.css$': 'identity-obj-proxy', @@ -12,4 +12,4 @@ module.exports = { ], setupFilesAfterEnv: ['@testing-library/jest-dom', './tests/setupTests.js'], }; - \ No newline at end of file +