-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No test found by running the test with the ui on a single file on Windows #1017
Comments
running npm v10.8 and same issue happens. |
@josersleal, can you also show us the spawned command line and the expected pattern above? |
Not anymore. the tests run on terminal though. Also the tests are visible in the runner but will not run. |
If you are still having problems running individual tests via the extension, please copy/paste the spawned command line from the console: see here. Or better yet, if you can create a sample repo so we can reproduce the issue here. |
@connectdotz I think I encountered the same issue. When debugging I see the spawn command is: Which results in: (when running from the test explorer, or when entering the command in the terminal)
When I change the slashes in the final argument en run in through the terminal, it works !! Extra info: |
I can't reproduce this issue in my env. But something didn't look right in the terminal output...
The regex is missing the escape back-slash for some reason. The expected output should be
What is your |
The double backslashes are present in the command, but get probably stripped away as escape character. Not sure if that only happens in the output, or also internally when matching the regex. From package.json
The jest config
|
I suspect |
Nice catch !! Removing the cross-env from the command solved it, thanks !! |
Before I found this issue, and the effect I edited the extension.js to replace the I also spotted that running a specific test didn't work without wrapping |
Environment
vscode-jest version
: [5.2.3]node -v
: [v16.13.2]npm -v
: [8.1.2]Prerequisite
Relevant Debug Info
I can run all the tests using the UI and with command line with no problem.
I can't run test one by one by clicking the red or green arrow directly on the file this result to 'No test found error'
In C:\Users\Florian\Desktop\Apps\crm-ui
2570 files checked.
testMatch: /tests//.[jt]s?(x), **/?(.)+(spec|test).[tj]s?(x) - 328 matches
testPathIgnorePatterns: C:\Users\Florian\Desktop\Apps\crm-ui\dist\, C:\Users\Florian\Desktop\Apps\crm-ui\node_modules\, C:\Users\Florian\Desktop\Apps\crm-ui\src\config\test.ts - 2570 matches
testRegex: - 0 matches
Pattern: c:\\Users\\Florian\\Desktop\\Apps\\crm-ui\\src\\features\\offerComposition\\components\\tests\\ServiceDetailsBanner\.test\.tsx - 0 matches
But It's working when I run npm run test:dev ServiceDetailsBanner.test.tsx
Expected Behavior
Run the test when i click on the red or green arrow on a single file
Actual Behavior
No test found when I run the test by clicking on the green or red arrow on a test file
The fastest (and the most fun) way to resolve the issue is to submit a pull-request yourself. If you are interested, feel free to check out the contribution guide, we look forward to seeing your PR...
The text was updated successfully, but these errors were encountered: