You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .opencode/skills/effect/SKILL.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,3 +28,11 @@ Use the current Effect v4 / effect-smol source, not memory or older Effect v2/v3
28
28
- In tests, prefer the repo's existing Effect test helpers and live tests for filesystem, git, child process, locks, or timing behavior.
29
29
- Do not introduce `any`, non-null assertions, unchecked casts, or older Effect APIs just to satisfy types.
30
30
- Do not answer from memory. Verify against `.opencode/references/effect-smol` or nearby code first.
31
+
32
+
## Testing Patterns
33
+
34
+
- Use `testEffect(...)` from `packages/opencode/test/lib/effect.ts` for tests that exercise Effect services, layers, runtime context, scoped resources, or platform integrations.
35
+
- Use `it.live(...)` for filesystem, git repositories, HTTP servers, sockets, child processes, locks, real time, and other live platform behavior.
36
+
- Run tests from package directories such as `packages/opencode`; never run package tests from the repo root.
37
+
- Prefer explicit test layers over ad hoc managed runtimes. Keep dependency provisioning visible in the test file.
38
+
- Use scoped fixtures and finalizers for resources that must be cleaned up, including temporary directories, flags, databases, fibers, servers, and global state.
0 commit comments