mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
## Summary Add Vue Testing Library (VTL) infrastructure and pilot-migrate ComfyQueueButton.test.ts as Phase 0 of an incremental VTL adoption. ## Changes - **What**: Install `@testing-library/vue`, `@testing-library/user-event`, `@testing-library/jest-dom`, and `eslint-plugin-testing-library`. Configure jest-dom matchers globally via `vitest.setup.ts` and `tsconfig.json`. Create shared render wrapper at `src/utils/test-utils.ts` (pre-configures PrimeVue, Pinia, i18n). Migrate `ComfyQueueButton.test.ts` from `@vue/test-utils` to VTL. Add warn-level `testing-library/*` ESLint rules for test files. - **Dependencies**: `@testing-library/vue`, `@testing-library/user-event`, `@testing-library/jest-dom`, `eslint-plugin-testing-library` ## Review Focus - `src/utils/test-utils.ts` — shared render wrapper typing approach (uses `ComponentMountingOptions` from VTU since VTL's `RenderOptions` requires a generic parameter) - ESLint rules are all set to `warn` during migration to avoid breaking existing VTU tests - VTL coexists with VTU — no existing tests are broken ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10319-test-add-Vue-Testing-Library-infrastructure-and-pilot-migration-3286d73d3650812793ccd8a839550a04) by [Unito](https://www.unito.io) --------- Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: GitHub Action <action@github.com>
59 lines
1.5 KiB
JSON
59 lines
1.5 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2023",
|
|
"useDefineForClassFields": true,
|
|
"module": "ESNext",
|
|
"lib": ["ES2023", "ES2023.Array", "DOM", "DOM.Iterable"],
|
|
"skipLibCheck": true,
|
|
"incremental": true,
|
|
"sourceMap": true,
|
|
"esModuleInterop": true,
|
|
"moduleResolution": "bundler",
|
|
"experimentalDecorators": true,
|
|
"emitDecoratorMetadata": true,
|
|
"resolveJsonModule": true,
|
|
"strict": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"noImplicitOverride": true,
|
|
"allowJs": true,
|
|
"verbatimModuleSyntax": true,
|
|
"paths": {
|
|
"@/*": ["./src/*"],
|
|
"@/utils/formatUtil": [
|
|
"./packages/shared-frontend-utils/src/formatUtil.ts"
|
|
],
|
|
"@/utils/networkUtil": [
|
|
"./packages/shared-frontend-utils/src/networkUtil.ts"
|
|
],
|
|
"@tests-ui/*": ["./tests-ui/*"]
|
|
},
|
|
"typeRoots": ["src/types", "node_modules/@types", "./node_modules"],
|
|
"types": [
|
|
"vitest/globals",
|
|
"@webgpu/types",
|
|
"@testing-library/jest-dom/vitest"
|
|
],
|
|
"outDir": "./dist",
|
|
"rootDir": "./"
|
|
},
|
|
"include": [
|
|
".storybook/**/*",
|
|
"eslint.config.ts",
|
|
"global.d.ts",
|
|
"knip.config.ts",
|
|
"lint-staged.config.ts",
|
|
"src/**/*.vue",
|
|
"src/**/*",
|
|
"src/types/**/*.d.ts",
|
|
"playwright.config.ts",
|
|
"playwright.i18n.config.ts",
|
|
|
|
"tests-ui/**/*",
|
|
"vite.config.mts",
|
|
"vitest.config.ts"
|
|
// "vitest.setup.ts",
|
|
]
|
|
}
|