-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Support jest.config.ts #8344
Comments
seconded |
Thanks for opening the issue. I'm not sure I see the benefit of supporting a ts file for the jest config. what utility is gained from using typescript here? it's just a configuration file. |
To sum it up:
To detail 1): To detail it 2) and 3): Put this inside Setting up eslint and prettier and the IDE(s) to work smoothly with TypeScript can be enough of a chore. We don't want to have to configure it for JavaScript too. |
I certainly understand if this isn't a high priority, but I wouldn't want it to not be prioritized at all. |
Thanks for clarifying @HansFalkenberg-Visma! Right now it's not the top of my list to support. As mentioned it works today and you can rename the file and adjust as needed for a workaround. But it's a good candidate for a community contribution as it's should adding an option for using TS and updating the generated path in the package/workspace json for the jest executor. Happy to help guide anyone who wants to take this on. Otherwise I'll get to it after a couple other issues that'll be in front of this one. |
move jest config and preset to ts files ISSUES CLOSED: #8344
move jest config and preset to ts files ISSUES CLOSED: #8344
move jest config and preset to ts files ISSUES CLOSED: #8344
move jest config and preset to ts files ISSUES CLOSED: #8344
move jest config and preset to ts files ISSUES CLOSED: #8344
move jest config and preset to ts files ISSUES CLOSED: #8344
move jest config and preset to ts files ISSUES CLOSED: #8344
move jest config and preset to ts files ISSUES CLOSED: #8344
move jest config and preset to ts files ISSUES CLOSED: #8344
move jest config and preset to ts files ISSUES CLOSED: #8344
move jest config and preset to ts files ISSUES CLOSED: #8344
move jest config and preset to ts files ISSUES CLOSED: #8344
* feat(testing): move jest config to .ts move jest config and preset to ts files ISSUES CLOSED: #8344 * fix(testing): update tests for jest.config.ts changes update tests broken by renaming jest fils to ts files
I'm not sure that just renaming the jest config to .ts is the proper way to solve this issue. Nx claims it can be used w/o TypeScript (and we do). It's one think to have a global typescript config file that nx maintains and no-one in the teams touches -- it is a wrinkle but okey. It's completely different to force TS with jest config files that are used and maintained by the teams. Might be a small thing for someone using TS but it brings a new world to people not using it -- new language, new toolset, new gotchas etc... (just landed with this issue after a migration just renamed all jest config files to .ts even though the workspace uses the --js preset). |
I agree with @ognen . Using typescript is no issue for me, but forcing it for everyone by migration doesn't make sense to me. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
If you changed your global jest.config.js to jest.config.ts, the library generators, e.g. @nrwl/angular:lib will generate a jest.config.js file in root and ignore the jest.config.ts
Current Behavior
A new /jest.config.js is generated and the lib/jest.config.js references that root jest.config.js
Expected Behavior
I'd expect the no new jest.config.js in the root, and the jest.config.js file in the library to reference the jest.config.ts, maybe even generate a jest.config.ts instead.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: