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

Pin "Run/ Debug" words above the code

Open rodrigocnascimento opened this issue 3 years ago • 9 comments

Hi,

There's a way to pin the words "run/ debug" above the code on the use cases? My code keeps jumping and it's a little annoying.

image

Thanks,

rodrigocnascimento avatar May 14 '21 15:05 rodrigocnascimento

Just had this too. It seems to remove the "Run | Debug" whenever there is a linting error. And a linting error happens during normal typing so the page is constantly jumping. Very annoying.

Can the "Run | Debug" just always be there? Regardless of errors.

Christilut avatar May 28 '21 08:05 Christilut

should be fixed in v0.4.35.

please re-open if your issue persists.

firsttris avatar Jun 02 '21 08:06 firsttris

Can we reopen this? it's still happening on v0.4.44

kamatheuska avatar Aug 14 '21 21:08 kamatheuska

Seems to be happening again with v0.4.47

Christilut avatar Oct 01 '21 06:10 Christilut

Reverting to 0.4.37 works for now.

Can we re-open this issue?

Christilut avatar Dec 10 '21 16:12 Christilut

Is still an issue in 0.4.47 can confirm.

amandapouget avatar Jan 04 '22 16:01 amandapouget

Reverting to 0.4.37 did not work for me. It just disabled the "Run|Debug" from appearing at all...

amandapouget avatar Jan 04 '22 16:01 amandapouget

Is there any workaround for this? It's basically unusable to have it enabled while editing tests.

jamietre avatar Feb 04 '22 12:02 jamietre

It is much more than mildly annoying when you're starting from a blank test template. It would be great to maybe only re-render on save or something, if it's not possible to fix. It seems like you might also be able to avoid re-renders when the file is not "parseable".

fwiw, I've seen the same issue in the Python testing suite and believe they offer a setting to only run render on save to help.

One option for those creating many tests in a single file, is to temporarily disable "codeLens" with the ~jestrunner.disableCodeLens~ editor.codeLens setting. The jestrunner.disableCodeLens mentioned in the README requires a restart. The editor.codeLens takes affect immediately. You can usethis simple extension to toggle vscode settings along with the below keybinding config:

  {
    "key": "cmd+alt+t",  // <<--- change to your preferred keybinding
    "command": "toggle",
    "when": "resourceFilename =~ /spec.ts$/ && editorTextFocus",   // <<-- only enabled when in a jest typescript file
    "args": {
      "id": "vscode",
      "value": [{ "editor.codeLens": true }, { "editor.codeLens": false }]
    }
  }

BrutalSimplicity avatar Feb 24 '22 06:02 BrutalSimplicity