I'm working with VSCode and installed the extension: "Jest" for better jest-testing-enviroment.
In the extension's instruction I saw we get a nice intellisense support for Jest's commands.
I dont get "Jest" icon on the bottom bar, which means the ext doesnt work properly.
I still dont get the intellisense support for jest's commands
Did anyone had this issue and find the way to configure it properly ?
The solution was to go to Windows PowerShell and open Visual Studio Code, then go to the extensions and restart the Remote - WSL extension, and go back to WSL. It then started working immediately.
Once I understood my folder structure was the reason for the extension not to work properly, I started using VSCode's Workspaces.
When using Workspaces you can have multiple projects in one folder. Each will be count as a root project. The Workspace allows you to have multiple root projects in the same folder (which actually solved my problem).
When working with Jest without setting a jest.config.js
file, you get your rootDir
to its default (which is the folder where the package.json
is in).
From what I experienced till now, vscode-jest extension is not so stable and still has some bugs. So in my case, I decided to disable it for the meanwhile.
Highly recommend using the jest runner extension instead.
Demo:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With