Skip to content

Commit b0196df

Browse files
committed
chore: add no-source-scanning test rule to CLAUDE.md
1 parent bb9eb06 commit b0196df

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CLAUDE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,16 @@ if (isCoverageMode) {
245245
- **Cross-platform**: Test path handling on Windows and Unix
246246
- **Follow patterns**: See `test/unit/getapi-sendapi-methods.test.mts` for examples
247247

248+
### Test Style — Functional Over Source Scanning
249+
250+
**NEVER write source-code-scanning tests**
251+
252+
Do not read source files and assert on their contents (`.toContain('pattern')`). These tests are brittle and break on any refactor.
253+
254+
- Write functional tests that verify **behavior**, not string patterns
255+
- For modules requiring a built binary: use integration tests
256+
- For pure logic: use unit tests with real function calls
257+
248258
### CI Testing
249259

250260
- **🚨 MANDATORY**: `SocketDev/socket-registry/.github/workflows/ci.yml@<SHA>` with full SHA

0 commit comments

Comments
 (0)