add claude specific configuration and instruction
This commit is contained in:
12
.claude/rules/testing.md
Normal file
12
.claude/rules/testing.md
Normal 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`
|
||||
Reference in New Issue
Block a user