-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
fix(jest-config): add mts
and cts
to default moduleFileExtensions
config
#14369
fix(jest-config): add mts
and cts
to default moduleFileExtensions
config
#14369
Conversation
…Extensions` config
…nd `cts` by default
✅ Deploy Preview for jestjs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I left a couple of minor comments.
docs/Configuration.md
Outdated
@@ -1177,6 +1177,7 @@ export default config; | |||
``` | |||
|
|||
We hope to support Prettier v3 seamlessly out of the box in a future version of Jest. See [this](https://github.com/jestjs/jest/issues/14305) tracking issue. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you split this change into separate PR, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I'll do it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks!
@@ -92,7 +92,7 @@ const {defaults} = require('jest-config'); | |||
|
|||
/** @type {import('jest').Config} */ | |||
const config = { | |||
moduleFileExtensions: [...defaults.moduleFileExtensions, 'mts', 'cts'], | |||
moduleDirectories: [...defaults.moduleDirectories, 'bower_components'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this changed to moduleDirectories
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same question. My guess: if 'mts'
and 'cts'
get included in the default, the code in the example does nothing useful for the user. So @yinm was simply trying to find a way to keep the example useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, @mrazauskas's guess is right. I was trying to find a way to keep the example useful at 0f3e261.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aha! makes sense 🙂
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
fixes #14149
This PR will only fix
Test plan
test locally