DashboardopencodeEffect testEffect and it.live

Effect testEffect and it.live

Category: preference
Confidence: 1.00
ID: 01a07f11-75c4-77d1-9367-ed5ca60d6cc5
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 0
Source session: 0OJYWmHUobcuQ4y8f
Created: 2026-09-08 03:12:47
Updated: 2026-09-15 15:48:14

Content

Always use testEffect(...) for Effect services, layers, context, and scoped resources; use it.live(...) for filesystem, Git, HTTP, sockets, processes, locks, and real time. Prefer actual implementations, explicit layers, scoped fixtures, and finalizers over mocks or ad hoc runtimes because ownership and cleanup remain visible. Avoid globalThis unless unavoidable and never duplicate implementation logic in tests. Run tests only from the owning package.

Move to: