You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Vitest config is dropped when test.server.deps.external already lists solid-js #454
On the 2.x line (main), vite-plugin-solid returns its test config only when it also sets test.server. If the user config already has solid-js in test.server.deps.external, the plugin does not set test.server, so it also drops test.environment = 'jsdom' and the @testing-library/jest-dom setup file.
The resolved Vitest config has no environment and no jest-dom setup file, so tests run in the default node environment, where DOM APIs such as document are not defined. Without the server.deps.external entry, the plugin sets both.
Expected behavior
The plugin sets the jsdom environment and the jest-dom setup file whether or not solid-js is already external. The next branch already does this (Object.keys(test).length ? { test } : {}).
Cause
Introduced in #183: ...(test.server ? { test } : {}) in src/index.ts.
Activity