feat(tests): add frontend automated testing setup with Vitest and jsdom

This commit is contained in:
Will Miao
2025-09-23 23:05:55 +08:00
parent dde7cf71c6
commit ae145de2f2
7 changed files with 2697 additions and 0 deletions

17
vitest.config.js Normal file
View File

@@ -0,0 +1,17 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['tests/frontend/setup.js'],
include: [
'static/js/**/*.test.js',
'tests/frontend/**/*.test.js'
],
coverage: {
enabled: false,
reportsDirectory: 'coverage/frontend'
}
}
});