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

CodeLens feature breaks on type cast #164

Closed h4de5 closed 3 years ago

h4de5 commented 3 years ago

CodeLens feature (run, debug) stops working for the whole file, when a type casting (<type>) is used somewhere it seems.

casting using as type still works.

2021-04-26_130631_J6pd

// breaks
describe('TestCodeLens', () => {
  it('should be true', () => {
    expect( <number> 1).toBeTruthy();
  });
});
// works
describe('TestCodeLens', () => {
  it('should be true', () => {
    expect( 1 as number ).toBeTruthy();
  });
});

using: vscode 1.55.2 jest runner v0.4.34

ehaynes99 commented 3 years ago

This is caused by this issue: https://github.com/jest-community/jest-editor-support/issues/68

gregoryzh commented 3 years ago

This is caused by this issue: jest-community/jest-editor-support#68

created PR for that, hopefully we could land it soon and resolve this. https://github.com/jest-community/jest-editor-support/pull/72

firsttris commented 3 years ago

should be fixed in v0.4.35 please re-open if the issue persists