Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Commit

Permalink
Upgrades Jest to v24 (#594)
Browse files Browse the repository at this point in the history
* Upgrades Jest to v24

* separates babel config for jest

* rebuild package.lock

* improves babel conf

* packagelocka
  • Loading branch information
tinkertrain authored and Jon Quach committed Apr 25, 2019
1 parent 2aa590c commit cb97577
Show file tree
Hide file tree
Showing 5 changed files with 10,750 additions and 11,067 deletions.
26 changes: 0 additions & 26 deletions .babelrc

This file was deleted.

35 changes: 35 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = api => {
const isTest = api.env('test')
const plugins = [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-flow-strip-types',
'inline-svg',
'emotion',
]

if (isTest) {
plugins.push('@babel/plugin-transform-runtime')
}

return {
presets: [
[
'@babel/preset-env',
{
targets: {
ie: '11',
edge: '16',
firefox: '60',
chrome: '65',
safari: '10',
node: '8',
},
loose: true,
},
],
'@babel/preset-flow',
'@babel/react',
],
plugins: plugins,
}
}
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = {
'<rootDir>/config/polyfills.js',
'<rootDir>/config/jsdomPolyfills.js',
],
setupTestFrameworkScriptFile: '<rootDir>/config/jest/setupTests.js',
setupFilesAfterEnv: ['<rootDir>/config/jest/setupTests.js'],
testMatch: [
'<rootDir>/src/**/__tests__/**/*.test.(js|jsx|ts|tsx)',
'<rootDir>/src/**/?(*.)(spec|test).js?(x)',
Expand Down
Loading

0 comments on commit cb97577

Please sign in to comment.