We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee58d73 commit d2bbd4fCopy full SHA for d2bbd4f
1 file changed
CLAUDE.md
@@ -378,6 +378,16 @@ Or use `scripts/generate-package-exports.mjs` to auto-generate exports.
378
- Mock external dependencies appropriately
379
- Use path helpers for cross-platform tests
380
381
+### Test Style — Functional Over Source Scanning
382
+
383
+**NEVER write source-code-scanning tests**
384
385
+Do not read source files and assert on their contents (`.toContain('pattern')`). These tests are brittle and break on any refactor.
386
387
+- Write functional tests that verify **behavior**, not string patterns
388
+- For modules requiring a built binary: use integration tests
389
+- For pure logic: use unit tests with real function calls
390
391
#### Running Tests
392
393
- **All tests**: `pnpm test`
0 commit comments