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

Parsing of test files with casting broken again since 0.4.36 #189

Closed mvindahl closed 3 years ago

mvindahl commented 3 years ago

This worked in 0.4.33, broke in 0.4.34, worked again in 0.4.35, and seems to have been broken since 0.4.36. Screenshots below are using 0.4.39.

It affects Typescript test files containing casts. As far as I can see, it prevents parsing of the file, causing codelens run/debug buttons not to be updated.

Example:

Minimal and meaningless test file after a clean restart of VSCode: image

Removing the offending line immediately causes the codelens buttons to appear. These work as expected. image

Reintroducing the offending line will not cause the codelens buttons to disappear. (But restarting VSCode will). image

I suspect, however, that the button locations have just been cached from the last successful parsing of the file. Altering the structure of the file will cause the buttons to render in unexpected places: image

firsttris commented 3 years ago

hey @mvindahl thx for reporting

firsttris commented 3 years ago

@mvindahl check if v0.4.40 or above fixes your issue

mvindahl commented 3 years ago

I installed 0.4.44 (the most recent version) and it works like a charm 👍

Thanks for taking the time to fix this 🙂