-
Notifications
You must be signed in to change notification settings - Fork 45
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
Support Request: VSCode suddenly can't find any tests #2880
Comments
Your diagnostics report shows that there is a problem with Wallaby determining your file paths/patterns from your jest configuration. Could you please:
If you're still having problems, could you please provide us with your jest configuration files? |
Thank you for the reply @smcenlly.
The only changes are from me when I setup the testing framework.
Yes, they run in the command line just fine. jest.setup.ts
jest.config.js
|
Thanks for sharing the details. Looks like the project folder name (replaced with
Can you please try renaming the |
The directory name is just my company name. 5 English alphabet characters. No spaces or punctuation or anything. Also not a symlink. I tried renaming the directory and it started working! Reverted the name change and it still worked. No idea what the issue was. Next time I'll be sure to add restarting my computer (always a good step) and then renaming the folder to the troubleshooting steps before I reach out. Thank you for the help! I'm closing the ticket. |
Unfortunately, I'm back. That fix didn't last long, and taking the same steps doesn't solve it (also tried restarting a couple times for good measure). I'm also seeing the same issue on the WebStorm IDE, although there it always fails a few tests. It appears that it's not using the mocks I've defined. Now in VSCode it seems to be giving the same failures that WebStorm is, but after the issue started up again it was giving the Again, this issue only appears on this repo and only when running Wallaby via the IDE. When running the tests for this repo via command line they all pass, and when running a different repo through Wallaby in VSCode or WebStorm, they both pass. |
VSCode is back to giving the |
|
Yes, it worked just fine.
No change. |
It definitely looks like the issue is related to either the project's path (because the sample repo has the config and dependencies exactly like in your project). Can you try re-naming the cloned sample repo folder to use the same name/path as Another thing I'd try is to clone your project's repo to some other folder closer to the disk root, such as |
It did stop working. However, I tried renaming the test repo folder from
I'm getting the same behavior as above where it can't seem to find the mocks. Any tests that don't rely on the mocks pass, but any that do fail. |
You mentioned:
and also
We had seen something similar in the past when changing the casing of an existing file (e.g. changing from upper case to lower case). The file path wouldn't update correctly in source control, but would update on disk. This then led to a range of strange issues with compilation, running tests, etc. The behavior of existing vs. fresh clone would also be different at that point. Could you please check your import/require path casing matches what exists on disk? You may need to run |
I do not have any paths that reference that directory since it is the root level for the repo. I also didn't rename anything until you requested I do so, so I don't see casing causing the issue.
I've been running these during every troubleshooting update without success. |
Are you able to provide us with a sample of your repo so we can see your project structure and try to reproduce the problem ourselves? Obviously you may have some sensitive/proprietary code in your project that you're unable to share, we would suggest taking a copy of your project, removing any source control folders, and then removing code until you're left with project configuration and a sample file/sample test where you can reproduce the problem (no actual production code except for project structure and test configuration). You may email the sample to us: hello@wallabyjs.com |
@smcenlly I've created a public example repo here: https://github.com/chris-decker-gantri/wallaby |
Thanks so much for providing the sample repo. We were able to reproduce your problem and identify what was going wrong. Your project has We have updated Wallaby to handle your project's scenario (where you have Please update to Wallaby core |
It works! Thank you SO much @smcenlly (and team)! It's hard to imagine writing tests without Wallaby, and that's currently my chief responsibility. I appreciate you taking the time to support us and the speed with which you push out hot fixes! |
Issue description or question
My project in VSCode is suddenly unable to find any tests when Wallaby was working previously without issue. It just says
0 failing tests, 0 passing
with no other logs.Environment:
Steps taken to attempt to resolve:
What does work:
Wallaby diagnostics report
The text was updated successfully, but these errors were encountered: