test: extract shared fixtures for clearer test code#168
Conversation
Extract repeated test setup into shared helpers and name those helpers with explicit Test prefixes so fixture code is clearly distinct from app code.
Greptile SummaryThis PR extracts repeated test setup code into three shared helper modules under Key changes:
Confidence Score: 5/5Safe to merge — pure test infrastructure refactoring with no changes to production code or test logic. All 16 changed files are test infrastructure only. The three new helper modules cleanly consolidate duplicated fixture code and follow the established createTest* naming convention documented in CLAUDE.md and now AGENTS.md. No production behavior is affected, no test assertions were changed, and no logic was altered — only import paths and fixture extraction. No P0 or P1 issues found. No files require special attention. The buildTest* aliasing pattern in src/session/commands.test.ts, src/ui/AppHost.interactions.test.tsx, and src/ui/components/ui-components.test.tsx is intentional and functional. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["test/helpers/app-bootstrap.ts\ncreateTestGitAppBootstrap"] --> B["AppHost.interactions.test.tsx"]
A --> C["AppHost.responsive.test.tsx"]
A --> D["AppHost.scroll-regression.test.tsx"]
A --> E["ui-components.test.tsx"]
F["test/helpers/diff-helpers.ts\ncreateTestDiffFile\ncreateTestHeaderOnlyDiffFile\nlines"] --> B
F --> C
F --> D
F --> E
F --> G["liveComments.test.ts"]
F --> H["loaders.ordering.test.ts"]
F --> I["diffSectionGeometry.test.ts"]
J["test/helpers/mcp-fixtures.ts\ncreateTestSession*\ncreateTestSelectedSessionContext"] --> K["client.test.ts"]
J --> L["daemonState.test.ts"]
J --> M["daemonState.registration.test.ts"]
J --> N["server.test.ts"]
J --> O["commands.test.ts"]
Reviews (1): Last reviewed commit: "test: make shared fixtures easier to spo..." | Re-trigger Greptile |
Summary
test/helpers/createTest*)AGENTS.mdto document the test-helper naming ruleTesting