Hello! I am integrating the new Vitest Browser mode into a project using Solid. Their guide suggests that if you want to use it alongside other test environments, you should configure it using workspaces.
The Solid Vite plugin does not appear to read the user test.workspace configuration and defaults to jsdom.
// ...constuserTest=(userConfigasany).test??{};consttest={}asany;if(userConfig.mode==='test'){// ...if(!userTest.environment&&!options.ssr){test.environment='jsdom';}// ...Which results on being prompted to install jsdom each time

Reproduction
I made a quick reproduction here.
Workaround
My current workaround is to do this on my vite.config.ts:
import{defineConfig}from"vite"importsolidfrom"vite-plugin-solid"importtsConfigPathsfrom"vite-tsconfig-paths"exportdefaultdefineConfig({plugins: [tsConfigPaths(),solid()],test: {// Workaround for Solid Vite plugin. Get's superseeded by `workspace` configenvironment: "node",workspace: [{extends: true,test: {include: ["**/*.test.{ts,tsx}"],name: "Node.js",environment: "node",},},{extends: true,test: {include: ["**/*.test.dom.{ts,tsx}"],browser: {enabled: true,headless: true,ui: false,provider: "playwright",instances: [{browser: "chromium",name: "DOM",},],},},},],},})Could the Solid Vite plugin also check the user test.workspace configuration? 🙂 I can draft a PR if the request makes sense
Hello! I am integrating the new Vitest Browser mode into a project using Solid. Their guide suggests that if you want to use it alongside other test environments, you should configure it using workspaces.
The Solid Vite plugin does not appear to read the user
test.workspaceconfiguration and defaults tojsdom.Which results on being prompted to install
jsdomeach timeReproduction
I made a quick reproduction here.
Workaround
My current workaround is to do this on my
vite.config.ts:Could the Solid Vite plugin also check the user
test.workspaceconfiguration? 🙂 I can draft a PR if the request makes sense