一键导入
vitest
Vitest with Vite in the Afenda monorepo — shared defaults from @afenda/vitest-config, RTL patterns, and troubleshooting. Use when configuring Vitest, writing or debugging unit tests, coverage, or mocks.
菜单
Vitest with Vite in the Afenda monorepo — shared defaults from @afenda/vitest-config, RTL patterns, and troubleshooting. Use when configuring Vitest, writing or debugging unit tests, coverage, or mocks.
| name | vitest |
| description | Vitest with Vite in the Afenda monorepo — shared defaults from @afenda/vitest-config, RTL patterns, and troubleshooting. Use when configuring Vitest, writing or debugging unit tests, coverage, or mocks. |
This workspace uses Vitest 4 with Vite 8. Shared configuration lives in packages/vitest-config (@afenda/vitest-config), not in ad hoc app shims.
docs/TESTING.md — file layout (__tests__/), RTL, MSW, env overrides, coverage presets.packages/vitest-config/AGENTS.md — consumption patterns and failure triage (fix product code first).docs/VITE_ENTERPRISE_WORKSPACE.md — Vitest reuses Vite; DevTools must stay off under VITEST (see apps/web/vite.config.ts).getAfendaVitestTestOptions() from @afenda/vitest-config/vitest/defaults — use in vite.config.ts test block.@afenda/vitest-config/vitest/setup — jest-dom matchers (pulled in by the factory for jsdom).For generic Vitest API details beyond Afenda conventions, prefer upstream docs above.
Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".
Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".
Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".
Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.
Design and implement website pages, landing sections, shared UI elements, and optional Storybook stories in Afenda's Vite app. Use when working on website or marketing design in `apps/web`, especially with Tailwind CSS v4, `@afenda/design-system/ui-primitives` shadcn-style components, responsive layouts, image blocks, feature cards, CTA sections, or `*.stories.tsx` deliverables.
React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.