Интеграционные тесты с фикстурами и снепшотами
★ 7.0 · testing
Generate Tests for New Code is a Claude Code skill that explains how to write integration tests for the clice project in TypeScript with vitest, covering fixture forms, the Workspace and CliceClient API, snapshot workflow, and hard rules for the tests/ directory. Reach for it when you need to add tests for new clice functionality and aren't sure which fixture form to pick; when a test scenario requires multiple servers, temporary workspaces, or custom argv; when you want to pin feature output through snapshots instead of writing manual assertions. Inside: three fixture forms — the bound form for single data-workspace suites, the `session` factory for complex multi-server scenarios with automatic teardown and anomaly gates, and snap tests for the corpus under `tests/snap/<feature>/`. The harness is built on the `@clice/tools` workspace package (`tools/`); tests run via `npx vitest run` with an explicit config path and `CLICE_EXECUTABLE` pointing to the clice binary; the gate is `npm run check` at repo root (strict tsc + ESLint, zero tolerance). The skill is about writing and structuring new tests correctly — not about running or debugging an existing suite. A good fit for developers contributing to clice; not applicable outside this repository, as the API and conventions are clice-specific.
- #typescript
- #vitest
- #integration-testing
- #test-fixtures
- #snapshot-testing