Closed Ghirigoro closed 4 months ago
I pulled the code out into a clean folder of its own and was able to use Wallaby to run the tests with no problems (although using automatic configuration)
In this case autoconfig
for an opened folder should hopefully work for you too. Can you please try opening your monorepo's root In VS Code, running Wallaby Select Configuration
command, and select Automatic Configuration <Custom Directory>
, then select the packages/fsm
folder.
I spotted an error in your configuration file. The autodetect
setting name is incorrectly cased, it should be autoDetect
(with a capital D
). Without your configuration, Wallaby is actually attempting to run your tests in the browser with Chrome instead of using vitest
.
We also don't recommend setting files
or tests
with autoDetect
unless there's a good reason. By default, Wallaby will be using vitest
's file / test patterns so there shouldn't be a need to override them.
I believe @ArtemGovorov's solution will work for you, and is our recommended approach.
@ArtemGovorov + @smcenlly: Thanks for the quick response. Sorry that I failed to mention it, but I was already selecting the configuration in VSCode. The typo seems to be the issue, since now it works, although I found that if I select "Closest project in monorepo" automatic detection works even without specifying a config file.
Just want to say that Wallaby and Quokka are that rarest of things: a tool that highlights the strengths of the JS ecosystem while abstracting away the chaos rather than adding to it. I have no idea how you all manage to tame the mess of tooling into something coherent, but thanks for your dedication to such a great product.
Issue description or question
I have a TypeScript project in a monorepo managed through pnpm (v9.0.4). I've tried to set up Wallaby for one of my internal packages but Wallaby seems unable to resolve any modules (both internal packages and npm modules).
I've tried:
But neither fixed (or changed) the problem.
I don't think it's an issue with IDE configuration, or the tests themselves. I pulled the code out into a clean folder of its own and was able to use Wallaby to run the tests with no problems (although using automatic configuration).
Not sure what to try next but any suggestions would be appreciated.
Wallaby diagnostics report