File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments