firsttris / vscode-jest-runner

Simple way to run or debug one or more tests from context menu, codelens or command plalette
https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner
MIT License
265 stars 124 forks source link

Pin "Run/ Debug" words above the code #173

Closed rodrigocnascimento closed 7 months ago

rodrigocnascimento commented 3 years ago

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,

Christilut commented 3 years ago

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.

firsttris commented 3 years ago

should be fixed in v0.4.35.

please re-open if your issue persists.

kamatheuska commented 3 years ago

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

Christilut commented 3 years ago

Seems to be happening again with v0.4.47

Christilut commented 2 years ago

Reverting to 0.4.37 works for now.

Can we re-open this issue?

amandapouget commented 2 years ago

Is still an issue in 0.4.47 can confirm.

amandapouget commented 2 years ago

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

jamietre commented 2 years ago

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

BrutalSimplicity commented 2 years ago

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 }]
    }
  }
firsttris commented 7 months ago

fixed in 0.4.73