Closed maasha closed 9 months ago
I have the following vite.config.ts in my project excluding tests from the temp dir:
vite.config.ts
temp
import react from '@vitejs/plugin-react' import { defineConfig } from 'vitest/config' import tailwindcss from 'tailwindcss' /** * Configuration for ViteJS * * @url https://vitejs.dev/config/ */ export default defineConfig({ base: './', plugins: [react()], test: { reporters: ['default', 'junit'], coverage: { reporter: ['text', 'json', 'html', 'cobertura'], provider: 'istanbul', }, environment: 'jsdom', globals: true, setupFiles: './src/common/test/test-setup.ts', exclude: ['**/node_modules/**', '**/temp/**'], }, server: { port: 8000, }, css: { postcss: { plugins: [tailwindcss], }, }, build: { rollupOptions: { output: { assetFileNames: 'output.css', }, }, }, })
However, in the vscode test pane the temp directory is shown and all tests within shown as failed, even though the temp directory should be ignored. When I change the setting of the vitest-dev/vscode extension to include temp it works as expected.
vitest-dev/vscode
"vitest.exclude": [ "**/node_modules/**", "**/dist/**", "**/temp/**", "**/cypress/**", "**/.{idea,git,cache,output,temp}/**" ]
But I was expecting the exclude options from the projects config to be upheld.
exclude
Befor PR #192 gets merged, this issue shouldn't be seen as solved!
I have the following
vite.config.ts
in my project excluding tests from thetemp
dir:However, in the vscode test pane the
temp
directory is shown and all tests within shown as failed, even though thetemp
directory should be ignored. When I change the setting of thevitest-dev/vscode
extension to includetemp
it works as expected.But I was expecting the
exclude
options from the projects config to be upheld.