Memex Admin
Dashboard
API Keys
Policies
Mem-Client: TestWithStore Pattern
Repository: mem-labs/mem
Back to Policies
Cancel
active
Updated Feb 19, 2026, 8:26 PM
Name
Status
active
inactive
Markdown
Store-dependent component tests should use `TestWithStore`. Rationale: - Shared test harness usage keeps store-based tests consistent and reduces fragile custom wiring. Scope: - PR review policy for component tests under `domains/frontend/mem-client/src/**/*.test.tsx`. Trigger: - A PR adds or changes manual provider harnessing with store contexts (`AppStoreContext.Provider`, `PublicAppStoreContext.Provider`, `GuestAppStoreContext.Provider`). Approval checks: 1) Store-dependent component tests render through `TestWithStore` by default. 2) Manual provider harnessing is only allowed with explicit `TEST_HARNESS_EXCEPTION` justification in the same test file. 3) Exception cases keep harnessing minimal and avoid full production app bootstrap wiring. Evidence: - Diff shows `TestWithStore` usage or explicit exception comment + minimal harnessing. Decision: - Return NOT APPROVED when trigger is met and harnessing rules are violated.
Cancel
Save Policy