Private
Public Access
feat(directives): add rule-statement header to 49-56 of 66 v1.md files
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# Tests must be narrow — exercise one behavioral change per test
|
||||
|
||||
## Pattern: Narrow Test Paths vs. Kitchen-Sink Functions
|
||||
|
||||
**Anti-pattern: calling a kitchen-sink function.** A test that does `gui_2.render_main_interface(app_instance)` requires mocking 50+ imgui/imscope methods because `render_main_interface` dispatches to dozens of nested render functions. Adding a single mock for `imscope.window` (to return a tuple) just reveals the next un-mocked dependency (e.g. `imgui.begin` returning bool where a 2-tuple is expected). The test never reaches its assertion.
|
||||
|
||||
Reference in New Issue
Block a user