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

chorer: add note about babel config to upgrade guide #12724

Merged
merged 3 commits into from
Apr 24, 2022
Merged
Changes from 1 commit
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
6 changes: 5 additions & 1 deletion docs/UpgradingToJest28.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Upgrading Jest from v27 to v28? This guide aims to help refactoring your configu

:::info

See [changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) for the full list of changes.
See [changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md#2800) for the full list of changes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this anchor doesn't do anything right now, but will be correct when I make the release


:::

Expand Down Expand Up @@ -182,3 +182,7 @@ import {jest} from '@jest/globals';
.mockResolvedValue('default')
.mockResolvedValueOnce('first call');
```

## Babel config
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps could go up? Or under Configuration? The idea was to keep alphabetical order, hoping that this could help the reader. But not necessary it works as I was thinking (;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair, moved it 👍


`babel-jest` now passes `root: config.rootDir` to Babel when resolving configuration. This improves compatibility when using `projects` with differing configuration, but it might mean your babel config isn't picked up in the same way anymore. You can override this option by passing options to `babel-jest` in your [configuration](Configuration.md#transform-objectstring-pathtotransformer--pathtotransformer-object).