-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Description
I have a project that uses vitest with happy-dom in conjunction with vite-plugin-solid. Switching from 2.7.0 of vite-plugin-solid to 2.7.1 breaks my unit tests.
Here's a relevant part of the test section of vite.config.mts:
test: {
environment: 'happy-dom',
globals: true,
server: {
deps: {
// fixes: You appear to have multiple instances of Solid. This can lead to unexpected behavior.
inline: [/solid-js/, /solid-testing-library/],
},
},
deps: {
// fixes: Vitest "deps.registerNodeLoader" is deprecated. If you rely on aliases inside external packages, use "deps.optimizer.web.include" instead.
optimizer: {
web: {
enabled: true,
},
},
},When I run vitest with vite-plugin-solid 2.7.0, everything works fine. When I run it with 2.7.1, I get:
Vitest "deps.registerNodeLoader" is deprecated.If you rely on aliases inside external packages, use "deps.optimizer.web.include" instead.
MISSING DEP Can not find dependency 'jsdom'
? Do you want to install jsdom? › (y/N)
The fact that it's not honoring either the environment: 'happy-dom' setting or the setting that suppresses the registerNodeLoader warning makes me think that something about 2.7.1 is preventing the test config from being loaded at all.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels