Skip to content

Commit e2bee79

Browse files
authored
chore: add no-source-scanning test rule to CLAUDE.md (#1130)
1 parent b9f8de0 commit e2bee79

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,16 @@ Socket CLI has different update mechanisms depending on installation method:
296296
- Fixtures in `test/fixtures/`
297297
- Coverage reporting available
298298

299+
### Test Style — Functional Over Source Scanning
300+
301+
**NEVER write source-code-scanning tests**
302+
303+
Do not read source files and assert on their contents (`.toContain('pattern')`). These tests are brittle and break on any refactor.
304+
305+
- Write functional tests that verify **behavior**, not string patterns
306+
- For modules requiring a built binary: use integration tests
307+
- For pure logic: use unit tests with real function calls
308+
299309
### External Dependencies
300310

301311
- Vendored modules in `src/external/` (e.g., ink-table)

0 commit comments

Comments
 (0)