[feat] Add an option to save the generated jest.config.js
See original GitHub issueI want to be able to run jest tests from within my IDE (IDEA). It is far easier to just run jest directly than through tsdx test
.
What I did was hacked a console.log()
into node_modules/tsdx/lib/index.js
, output the generated jest config and saved that in a jest.config.js file. Had to edit it a bit to remove the absolute paths (🤷♂ why those are there), but it works perfectly.
So, it would be nice to have something like the eslintconfig save option, but for the jest config.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:23 (17 by maintainers)
Top Results From Across the Web
Configuring Jest
It is recommended to define the configuration in a dedicated JavaScript, TypeScript or JSON file. The file will be discovered automatically, if ...
Read more >Configuring Jest for Visual Studio Code - Beyond Java
Now select the second option, "Setup Jest Debug Config". It generates a launch configuration for the VS Code debugger.
Read more >Setup Jest with Vite (featuring SWC) - Blog by hung.dev
Integrating Jest to Vite. First, generate React Typescript project using Vite. I'm gonna using npm , you can use yarn or ...
Read more >Jest ignore or exclude file/function/statement from test coverage
Take your JavaScript testing to the next level by learning the ins ... There's a Jest configuration option testPathIgnorePatterns (see the ...
Read more >Jest | IntelliJ IDEA Documentation - JetBrains
Optionally specify the jest.config.js or jest.config.ts file to use: select ... To do that, add the --watch flag in the Jest options field....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lookfirst I totally agree. I’m working in WebStorm and it has good integration with Jest but it will only work with
jest.config.js
present because otherwise, typescript will not compile during tests.I ended up creating
jest.config.js
withIt works although it’s far from ideal solution as
createJestConfig
checks ifjest.config.js
file is present and might create a recursive loopIt would be awesome to add similar functionality to
yarn lint --write-file
Yes, tsdx test makes sense so we can upgrade jest for all of our users