Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move babel config to jest config #5562

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .babelrc

This file was deleted.

13 changes: 0 additions & 13 deletions babel.config.cjs

This file was deleted.

25 changes: 23 additions & 2 deletions test/config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,29 @@ exports.createJestConfig = function createJestConfig(
...transform,
'\\.[jt]sx?$': [
'babel-jest',
// rootMode upwards makes use of the global babel.config.js
{rootMode: 'upward'},
{
// Don't look for babel.config.{ts,js,json} files or .babelrc files
configFile: false,
babelrc: false,
// The rest is only needed by Jest, if Jest is updated to no longer need babel then this can be removed as well as related dependencies
presets: [
[
'@babel/preset-env',
{
targets: {
node: '14',
chrome: '61',
safari: '11.3',
firefox: '60',
edge: '79',
},
},
],
'@babel/preset-typescript',
['@babel/preset-react', {runtime: 'automatic'}],
],
plugins: ['@babel/plugin-proposal-class-properties'],
},
],
},
snapshotFormat: {
Expand Down
Loading