vitest extension does not pick any tests in vscode
I have a regular TS-based sveltekit project with vitest added.
When I run "npm run test" from the command line, everything works as expected with standard cli-based vitest running.
I was trying to have it in the vscode test explorer. I installed the extention above. Alas, it need not find any tests and nothing happened.
I'm also in same/similar trouble 'vitest' is gray out
I'm also dealing with the same problem. It also does not work with the debugger.
I get this error when debugging.
( Vitest should be configured to be able to run from project root )
Error when running
/home/louiss/main/web-projects/libraries/class-names-filter-sorter/node_modules/.bin/vitest /home/louiss/main/web-projects/libraries/class-names-filter-sorter/lib/classMapChangers.spec.ts -t Test if all class map changers work Test attemptToChangeUtilityClassBasedOnTheTypeAndValueThenReturnResultOfItHasChanged\(\) It works well with classes that are used for colors createTestMessageForTestingIfAClassNameChangesTheMapWithAnExpectedKeyAndAValueTHatIsAMapWithAnExpectedKeyAndValue\(\"color\"\)
cwd: /home/louiss/main/web-projects/libraries/class-names-filter-sorter
node: v20.2.0
I'm using OS Linux Ubuntu. I'm using vitest version ^0.34.4 I'm also using the latest version of this extension as well.
Here is my vitest config
import { defineConfig } from 'vitest/config'
export default defineConfig({
build: {
lib: {
entry: './lib/main.ts',
name: 'Class Name Filter Sorter',
fileName: 'index',
formats: ["es", "iife"]
}
},
test: {
globals: true,
cache: {
dir: 'node_modules/.vitest',
},
environment: 'node',
include: ['lib/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
}
})
Here is the repo. https://github.com/louiss0/class-names-filter-sorter