vscode-jest icon indicating copy to clipboard operation
vscode-jest copied to clipboard

command 'io.orta.jest.coverage.toggle' not found

Open rightaway opened this issue 7 years ago • 7 comments

Environment

  1. node -v: [9.5.0]
  2. npm -v: [yarn 1.3.2]

Using version 2.6.0 of the extension.

  1. Operating system: [linux]

Steps to Reproduce

Try to toggle code coverage overlay

Expected Behavior

Should show overlay

Actual Behavior

Gives error command 'io.orta.jest.coverage.toggle' not found

rightaway avatar Feb 06 '18 00:02 rightaway

Can you please provide more details, a repo to reproduce the issue, and how you've started the extension.

seanpoulter avatar Feb 06 '18 00:02 seanpoulter

So it looks like it happens if I use the "Jest Toggle Coverage Overlay" command before doing the "Jest Start Runner" command. It should do it for you in that case.

But when I do Start Runner, I get an error "This extension relies on Jest 20+ features, it will continue to work, but some features may not work correctly." even though I have Jest 22 installed. pathToTest is set to the default which is where my jest executable is. In what cases do I need to set rootPath?

rightaway avatar Feb 06 '18 08:02 rightaway

command 'io.orta.jest.restart' not found when using Yarn v2 /w PnP

pathToJest: "yarn jest"

koistya avatar Apr 02 '20 15:04 koistya

Do you have any more information about how to reproduce the issue @koistya? The command is registered when the extension is activated in https://github.com/jest-community/vscode-jest/blob/master/src/extension.ts#L29. How did you get it to break?

seanpoulter avatar Apr 27 '20 05:04 seanpoulter

@seanpoulter I'm seeing the same thing; I can manually start the runner with "Jest: Start Runner" but I get the "not found" message if I use "Jest: Restart Runner".

Similar to @koistya I'm using yarn v2 with PNP and pathToJest: "yarn jest", if that helps at all. I also have Jest configured through package.json rather than in its own config file, which means it doesn't start automatically.

(In any case, I don't think this is the same as the coverage issue; should probably be its own bug.)

peterjanes avatar Jun 01 '20 15:06 peterjanes

i preformed the following: uninstalled jest, installed jest in WSL. toggling coverage and the setup extension beta option result in errors such as this:

image

since this project has no jest settings in settings.json i added a simple jest.rootPath to the parent which contains the jest.config.js file. the above errors continued to repete.

i then tried jest: start all runners and the hour glass icon popped up in the left hand extensions set. it reports 2/2 tests pass. toggle coverage started working.

steven87vt avatar Sep 16 '21 01:09 steven87vt

For anyone coming to this, what helped me was to first run the Jest: Start all runners from the command palette and if needed reload VSCode.

alexandar1000 avatar Apr 14 '22 14:04 alexandar1000

i do highly recommend jest runner extension instead, its options in the context menu are super powerful and works perfectly for monorepos.

you need to set https://code.visualstudio.com/docs/editor/workspaces for jest extension if you are working with monorepos or a jest.config if is a single project/repo

grinsteindavid avatar Oct 05 '22 01:10 grinsteindavid

this is a pretty old issue. In any case these "command: 'io.orta.jest.xxx'" not found is usually dut to this extension is not activated. With v5.0.0 the activation should not be an issue any more.

connectdotz avatar Oct 09 '22 18:10 connectdotz