Closed andreviallon closed 10 months ago
We're having the same issue, if this could be fixed it would be awesome, as using the function names provides a much easier and more consistent way of naming test suites for a given method, and makes renaming the test seamless when the method name changes, as it's just using the reference to the method name.
Does the jest-cli support escaping currently? If not, this bug might be needed to be fixed in the jest-cli, not vscode :/
Does the jest-cli support escaping currently? If not, this bug might be needed to be fixed in the jest-cli, not vscode :/
Well, the extension works when running tests for the whole file in watch mode, so I guess it's bug
Does the jest-cli support escaping currently? If not, this bug might be needed to be fixed in the jest-cli, not vscode :/
Well, the extension works when running tests for the whole file in watch mode, so I guess it's bug
Testing the full file is not a problem. The problem is, that, when testing specific tests from a test-file, the name of the test-case is passed as parameter to the jest-cli. If this name however contains certain quotation-chars, this is basically ending the parameter too early. I'm not sure if the jest-cli currently supports escaped quotes in its cli-params? I've had this problem with different vscode-extensions, they all had trouble with certain quotes :/
I think .name
is supported by #301?
The code replaces the .name
suffix with the empty string here:
Please re-open if I'm mistaken 👍
Hello,
I have an issue when running tests in a file where either the name of a "describe" or a "it" is not a string but instead a function.name. In the example bellow I use sum.name as the name for the describe (line 3 in sum.spec.ts) and all tests will be skipped when running tests through the extension.
Does not work:
Works: