visual-studio-codejestjs

vscode jest extension doesn't work properly


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.

The Problem:

  1. I dont get "Jest" icon on the bottom bar, which means the ext doesnt work properly.

  2. I still dont get the intellisense support for jest's commands

My Question:

Did anyone had this issue and find the way to configure it properly ?


Solution

  • Solution:

    Once I understood my folder structure was the reason for the extension not to work properly, I started using VSCode's Workspaces.

    Explanation:

    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).

    P.S.

    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.