-
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
Vitest - Wallaby won't start with vitest.workspace.ts
and a defineWorkspace
config
#3328
Comments
Based on your diagnostics report, it looks like you have a mono-repo For Vite projects, Wallaby needs to be started on the mono-repo root. If my assumption above is accurate, can you please try opening Wallaby on the |
Sorry for the confusion, the |
From your diagnostics report, it looks like Vite / Wallaby is somehow not able to find:
Are those files all part of a specific project? Where do those files live in relation to your project root? Can you please try limiting which projects are included in your I understand this may be difficult, but is it possible for you to create a reproducible sample for us? |
I think there is actually an issue that has just been fixed in Vitest that might be causing this problem! I'll retest with that change and see if I'm still having issues. |
Okay, after testing, that has no effect, as it's just isolated to the JUnit reporter. I'll investigate if there's a particular project that's causing the problem. |
@smcenlly Okay, I've tried to make a reproduction repo for the issue, but I'm not even getting to the missing files part. I can inconsistently get Wallaby to start, but most of the time it's failing with the errors described in the README here: https://github.com/lsanwick/vitest-wallaby-workspace-issue/tree/main |
Thank you for the sample repo. I'm not sure we would have been able to work out why it was failing without it. When Wallaby runs your vite project, it has to first spawn a separate process to get your vite configuration before starting to run your tests. For some reason, for your project this was failing (we could reproduce your problem). We've updated Wallaby to have a more robust mechanism for communicating your configuration from the spawned process. It should now work for you in Wallaby core |
Thanks for the help @smcenlly! I've progressed a little further in the investigation. If I set up my
or like:
Wallaby manages to run without issues. If I include both packages, like so:
Then I start getting the missing files errors. All of the files listed appear to be ones that incorrectly resolved imports for This is doubly strange because there are far more imports from |
@lsanwick - are you able to update your sample repo to break in the same way so that we can try and work out what's going on? |
I haven't been able to get it to reproduce the issue there, I will keep working on it this week. |
I'm going to close this issue for now as we haven't heard back. If/when you reply with a sample repo, we'll re-open. |
Issue description or question
Vitest:
vitest/1.2.1 darwin-arm64 node-v20.9.0
Wallaby:
v1.0.1520
I've been working on migrating from Jest to Vitest, but have been struggling to get Wallaby to work consistently after the migration.
I had to add this to my
package.json
to even get Wallaby to autodetect Vitest, I think because of the lack of a root-levelvitest.config.ts
:My project is a monorepo, so it's using Vitest's feature of having
vitest.workspace.ts
file in the root withdefineWorkspace
rather than avitest.config.ts
file. Everything is working and passing usingyarn vitest
at the root of the project, and I can get individual tests to run with Wallaby utilizingSmart Start
. If I try to useStart
with Wallaby it eventually fails with issues loading urls of files that definitely exist in one of the projects.I've attached the diagnostics report below, any guidance would be helpful, thanks!
Wallaby diagnostics report
wallaby-diagnostic-report.txt
The text was updated successfully, but these errors were encountered: