DashboardopencodeEffect testEffect and it.live

Effect testEffect and it.live

Category: preference
Confidence: 1.00
ID: 01a0b394-cfca-7cec-b431-b29ad3e629b1
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-18 08:14:29

Content

Always use testEffect(...) from packages/opencode/test/lib/effect.ts for Effect services, layers, runtime context, scopes, and platform integrations; use it.live(...) for filesystems, Git, HTTP, sockets, processes, locks, and real time. Prefer actual implementations, explicit test layers, and scoped fixtures/finalizers over mocks, ad hoc managed runtimes, or globals so provisioning, ownership, and cleanup remain visible. Run tests only from the owning package directory.

Move to: