Files
nas-tools/dashboard/frontend/vitest.config.js
Gan, Jimmy 24969d0d3e
Deploy Dashboard (Dev) / deploy-dev (push) Successful in 1m33s
Run Tests / Backend Tests (push) Successful in 2m6s
Run Tests / Frontend Tests (push) Failing after 2m19s
Run Tests / Test Summary (push) Failing after 13s
fix: add compilerOptions to Svelte plugin in vitest config
The Svelte plugin was receiving an incomplete config object, causing
Object.values() to fail on undefined in the hot-update plugin.

Added compilerOptions.dev to provide a complete plugin configuration.
2026-04-08 00:47:31 +08:00

29 lines
562 B
JavaScript

import { defineConfig } from 'vitest/config';
import { svelte } from '@sveltejs/vite-plugin-svelte';
export default defineConfig({
plugins: [
svelte({
hot: !process.env.VITEST,
compilerOptions: {
dev: true
}
})
],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./tests/setup.js'],
coverage: {
provider: 'v8',
reporter: ['text', 'html', 'lcov'],
exclude: ['node_modules/', 'tests/', 'dist/', '*.config.js']
}
},
resolve: {
alias: {
'@': '/src'
}
}
});