Phase 7-8
This commit is contained in:
parent
a196b8f9a8
commit
0148f48204
25 changed files with 2473 additions and 47 deletions
12
web/vitest.config.ts
Normal file
12
web/vitest.config.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { defineConfig } from 'vitest/config'
|
||||
|
||||
// Unit test สำหรับ pure functions (fieldValidation/snapshot) + useTheme (ต้องมี DOM)
|
||||
// ไม่ดึง @nuxt/test-utils — stub เฉพาะ auto-imports ที่ใช้จริง (test/setup.ts) ให้เบาและอธิบายตัวเอง
|
||||
// (useTheme แยก client/server ด้วย typeof window จึงไม่ต้อง replace import.meta.client)
|
||||
export default defineConfig({
|
||||
test: {
|
||||
environment: 'happy-dom',
|
||||
setupFiles: ['./test/setup.ts'],
|
||||
include: ['test/**/*.spec.ts'],
|
||||
},
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue