mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-11 16:30:57 +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>
1.5 KiB
1.5 KiB