mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
## Summary Simplify default scripts. Filtering is still available to users, we can revisit tagging or grouping later. This fixes the issue where we had tests that were in the codebase but never run because they weren't under `/src/components` Also deletes the duplicate litegraph tests and their associated vitest config file. ## Changes - **What**: Test cleanup ## Review Focus ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5888-Tests-Vitest-configuration-cleanup-2806d73d36508197b800f68f0b028279) by [Unito](https://www.unito.io)
49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
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('packages/design-system/src/icons')
|
|
}
|
|
})
|
|
],
|
|
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/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'
|
|
],
|
|
coverage: {
|
|
reporter: ['text', 'json', 'html']
|
|
},
|
|
exclude: [
|
|
'**/node_modules/**',
|
|
'**/dist/**',
|
|
'**/cypress/**',
|
|
'**/.{idea,git,cache,output,temp}/**',
|
|
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*'
|
|
],
|
|
silent: 'passed-only'
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@/utils/formatUtil': '/packages/shared-frontend-utils/src/formatUtil.ts',
|
|
'@/utils/networkUtil':
|
|
'/packages/shared-frontend-utils/src/networkUtil.ts',
|
|
'@': '/src'
|
|
}
|
|
},
|
|
define: {
|
|
__USE_PROD_CONFIG__: process.env.USE_PROD_CONFIG === 'true'
|
|
}
|
|
})
|