mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
chore: merge vitest config into vite.config.mts (#8132)
Moves vitest configuration from `vitest.config.ts` into the `test` section of `vite.config.mts` and deletes the separate vitest config file. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8132-chore-merge-vitest-config-into-vite-config-mts-2eb6d73d365081ab81b5dca11fadf13a) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -11,8 +11,8 @@ import IconsResolver from 'unplugin-icons/resolver'
|
||||
import Icons from 'unplugin-icons/vite'
|
||||
import Components from 'unplugin-vue-components/vite'
|
||||
import typegpuPlugin from 'unplugin-typegpu/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
import type { ProxyOptions, UserConfig } from 'vite'
|
||||
import { defineConfig } from 'vitest/config'
|
||||
import type { ProxyOptions } from 'vite'
|
||||
import { createHtmlPlugin } from 'vite-plugin-html'
|
||||
import vueDevTools from 'vite-plugin-vue-devtools'
|
||||
|
||||
@@ -511,5 +511,27 @@ export default defineConfig({
|
||||
optimizeDeps: {
|
||||
exclude: ['@comfyorg/comfyui-electron-types'],
|
||||
entries: ['index.html']
|
||||
},
|
||||
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'happy-dom',
|
||||
setupFiles: ['./vitest.setup.ts'],
|
||||
retry: process.env.CI ? 2 : 0,
|
||||
include: [
|
||||
'src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
||||
'packages/**/*.{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'
|
||||
}
|
||||
}) satisfies UserConfig as UserConfig
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user