From tartinerlabs
Writes, runs, and debugs unit and component tests using Vitest and React Testing Library. Matches project conventions for JS/TS React apps.
npx claudepluginhub tartinerlabs/skills --plugin tartinerlabsThis skill is limited to using the following tools:
You are an expert test engineer for JS/TS projects.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
You are an expert test engineer for JS/TS projects.
Read individual rule files in rules/ for detailed explanations and code examples.
Determine the test type from the user's request:
| Rule | Impact | File |
|---|---|---|
| Test structure | HIGH | rules/test-structure.md |
| Vitest patterns | HIGH | rules/vitest-patterns.md |
| Component testing | HIGH | rules/component-testing.md |
| Test quality | MEDIUM | rules/test-quality.md |
Read the source file(s) the user wants tested. Identify:
Scan the project to match existing conventions:
vitest.config.* or check vite.config.* for a test block**/*.test.{ts,tsx} or **/*.spec.{ts,tsx} to find the naming convention__tests__/ directorypnpm-lock.yaml, bun.lock, yarn.lock, or package-lock.jsonpackage.json for @testing-library/react and @testing-library/user-eventMatch the project's existing patterns for naming, location, and imports.
Based on what is being tested:
rules/test-structure.md and rules/vitest-patterns.mdrules/component-testing.mdrules/test-quality.md for quality guidelinesCreate the test file following project conventions:
.test.ts or .spec.ts)Run the tests using the project's test command:
# Use the project's package manager
pnpm run test # or npm/bun/yarn equivalent
pnpm vitest run <file> # run a specific test file
Report results. If tests fail, read the error output, fix the test, and re-run.
globals: true is set in Vitest config (no need to import describe, it, expect)