Closed TeaBough closed 11 months ago
Unfortunately we were not able to identify the cause of the problem from your diagnostics report.
We generated a sample repo that has the same structure as your project, but that also worked for us. Could you please check if our repo works for you?
To setup the repo:
git clone https://github.com/wallabyjs/wallaby-3274
cd wallaby-3274
pnpm install
wallaby.js
, update your node path if required.computeDefaultDate.test.ts
and select Start Exclusive Test Run
If this works for you, could you also try deleting your node_modules
and your pnpm-lock.yaml
on your project and then reinstall your project dependencies?
If things are still not working after trying that, can you please try updating the sample repo to break in the same way as your project? I may not have some of your vite
or vitest
configuration that is relevant to it failing.
@TeaBough - did you get this working?
I'm going to close the issue since we haven't heard back, but we can open it if you're still having problems.
If things are still not working for you, please update the sample repo to break in the same way as your project.
Actually no... the sample repo you provided was working though... I don't know how to furthur try to fix that issue...
You should be able to diff your project's configuration / tests with our sample project and then try updating our sample with your configuration until our sample project breaks in the same way as your project.
Alternatively, you could create a minimal reproducible repo based on your current project. If you current project is open source, or you're able to share with us, we can take a look at that also.
@smcenlly Here is a minimal repo with the bug... It looks like it's due to the pnpm workspace, if I remove the website folder or if I remove website
from the pnpm.workspace.yml
, it works...
https://github.com/TeaBough/wallaby-test2
Thanks for the sample repo. It looks like the issue is caused by pnpm
hoisting vitest
and so Wallaby integration doesn't work when you're running for the nested project.
You should be able to fix this by updating your hoist patterns to not hoist vitest
. Next week we will investigate whether we can update Wallaby to automatically accommodate this for you.
So if I've understood correctly you suggest having a .npmrc
that looks like this in ./app
public-hoist-pattern[]=!*vitest*
public-hoist-pattern[]=vite-node
The problem is that now I fall into a previous problem :
Failed to initialize wallaby vitest.
Required dependency '@vitest/runner' not found. If you are using pnpm, please refer to our docs: (https://wallabyjs.com/docs/integration/vitest.html#using-pnpm)
Error: Required dependency '@vitest/runner' not found. If you are using pnpm, please refer to our docs: (https://wallabyjs.com/docs/integration/vitest.html#using-pnpm)
We have determined the cause of your problem, your project has multiple versions of vitest
installed. This results in Wallaby using the wrong version at runtime and so your test results are not correctly reported.
To fix the problem, you can update your ./website/package.json vitest version to be the same as your ./app/package.json. ("vitest": "^0.34.6"
).
Alternatively, you can explicitly install the dependencies that are not resolving correctly in each package.json
. For example:
projectDir/app> `pnpm install -D @vitest/runner @vitest/snapshot`
One more item to note, you may need to reset your Wallaby cache with the Help | Wallaby.js | Reset Wallaby Cache
menu item after fixing your dependency versions.
Issue description or question
When running my tests with intellij I get the errors in the console :
But not in the test results :
I've tried removing node_modules, updating intellij and clear wallaby cache...
Wallaby diagnostics report