add claude specific configuration and instruction

This commit is contained in:
2026-03-31 12:28:50 +02:00
parent 27de32ce9f
commit 49c2e0668d
5 changed files with 70 additions and 0 deletions

12
.claude/rules/testing.md Normal file
View File

@@ -0,0 +1,12 @@
---
paths: ["**/*.spec.ts", "**/*.type-spec.ts"]
---
# Test Conventions
- **`*.spec.ts`** — runtime tests. Use Arrange/Act/Assert with `describe`/`it` blocks.
- **`*.type-spec.ts`** — compile-time type tests. Use `expectTypeOf(x).toEqualTypeOf<T>()` from expect-type.
- Tests live in `spec/` directories next to the module, one file per operation (e.g., `map.spec.ts`).
- When adding a new method, create both a `*.spec.ts` and `*.type-spec.ts` for it.
- Run runtime tests: `pnpm test -- src/{module}/spec/{file}.spec.ts`
- Run type tests: `pnpm test:types`