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

Docs: improve babel-jest README.md file #14957

Merged
merged 4 commits into from
Mar 26, 2024
Merged
Changes from 2 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
10 changes: 10 additions & 0 deletions packages/babel-jest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,18 @@ _Note: this step is only required if you are using `babel-jest` with additional

To explicitly define `babel-jest` as a transformer for your JavaScript code, map _.js_ files to the `babel-jest` module. Typescript files are also supported.

By default, it loads your existing Babel configuration (if any)

```json
"transform": {
"\\.[jt]sx?$": "babel-jest"
},
```

You can use also pass further [babel options](https://babeljs.io/docs/options)
SimenB marked this conversation as resolved.
Show resolved Hide resolved

```json
"transform": {
"\\.[jt]sx?$": ["babel-jest", { "extends": "./babel.config.js", "plugins": ["babel-plugin-transform-import-meta"] }]
},
```
Loading