Files
ComfyUI_frontend/vitest.config.ts
snomiao 7d7c6a324a [feat] Enhanced auto-retry configuration for flaky tests (#5089)
- Increased Playwright test retries from 2 to 3 in CI environment
- Added Vitest retry configuration (2 retries) for unit tests in CI
- Addresses issues #4658 and #4416 with consistently flaky tests

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-18 21:41:42 -07:00

38 lines
885 B
TypeScript

import vue from '@vitejs/plugin-vue'
import { FileSystemIconLoader } from 'unplugin-icons/loaders'
import Icons from 'unplugin-icons/vite'
import { defineConfig } from 'vitest/config'
export default defineConfig({
plugins: [
vue(),
Icons({
compiler: 'vue3',
customCollections: {
comfy: FileSystemIconLoader('src/assets/icons/custom')
}
})
],
test: {
globals: true,
environment: 'happy-dom',
setupFiles: ['./vitest.setup.ts'],
retry: process.env.CI ? 2 : 0,
include: [
'tests-ui/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
'src/components/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'
],
coverage: {
reporter: ['text', 'json', 'html']
}
},
resolve: {
alias: {
'@': '/src'
}
},
define: {
__USE_PROD_CONFIG__: process.env.USE_PROD_CONFIG === 'true'
}
})