vscode-jest-runner
vscode-jest-runner copied to clipboard
Test with template literal is not working
If you have such a test
it(`should ${'foo'}`, () => {
});
it will be skipped
The issue has apparently been fixed in jest-editor-support but the fix hasn't landed here. I guess it's just a matter of updating the dependency to the latest version and releasing a new version, is that correct?
hey @micaelmbagira i guess yes.
you can easily verify for yourself
clone the repo update package npm install (vscode) Go to Menu "Run" => "Start Debugging" open your project with the new vscode instance just open
@firsttris unfortunately, updating jest-editor-support
didn't fix it 😢
can you check if this is working with version 0.4.33
@firsttris Still not, unfortunately.
I can confirm it stil doesn't work. The test will skip as soon a dollar sign is in the description.
it('skip me $' , () => {});
In case. Tested with Windows
With an ` in the test name the console expects additional input on Windows.
$ node "c:/redacted/node_modules/jest/bin/jest.js" "c:/redacted.spec.ts" -c "c:/redacted/jest.config.js" -t "Test `"
>
I can confirm for the current version, for us the test is skipped if the test-title is contains something like this with those special quotes inside
it('should trigger `onChange` event when value changes', () => {...
The onChange in this case is considered as a bash-command (which doesn't exist) because it's used directly in the commandline.
It also doesn't work if the test name is not a string literal (e.g. describe(MyClass.name, ...)
instead of describe('MyClass', ...)
)