diff options
| author | Kit Langton <[email protected]> | 2026-04-29 21:24:45 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-29 21:24:45 -0400 |
| commit | 4fe14abb8cd34b8af20d31b656715fd140fa4eed (patch) | |
| tree | 22b3ce80d911ccb927b812ecac225a42a9d80ddf /.opencode | |
| parent | 9052e8a1bac3a546c3bd06eb2f550fa8cea3b4fa (diff) | |
| download | opencode-4fe14abb8cd34b8af20d31b656715fd140fa4eed.tar.gz opencode-4fe14abb8cd34b8af20d31b656715fd140fa4eed.zip | |
test: cover HttpApi instance context middleware (#25032)
Diffstat (limited to '.opencode')
| -rw-r--r-- | .opencode/skills/effect/SKILL.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.opencode/skills/effect/SKILL.md b/.opencode/skills/effect/SKILL.md index 78216ab01..3a44fa88d 100644 --- a/.opencode/skills/effect/SKILL.md +++ b/.opencode/skills/effect/SKILL.md @@ -28,3 +28,11 @@ Use the current Effect v4 / effect-smol source, not memory or older Effect v2/v3 - In tests, prefer the repo's existing Effect test helpers and live tests for filesystem, git, child process, locks, or timing behavior. - Do not introduce `any`, non-null assertions, unchecked casts, or older Effect APIs just to satisfy types. - Do not answer from memory. Verify against `.opencode/references/effect-smol` or nearby code first. + +## Testing Patterns + +- Use `testEffect(...)` from `packages/opencode/test/lib/effect.ts` for tests that exercise Effect services, layers, runtime context, scoped resources, or platform integrations. +- Use `it.live(...)` for filesystem, git repositories, HTTP servers, sockets, child processes, locks, real time, and other live platform behavior. +- Run tests from package directories such as `packages/opencode`; never run package tests from the repo root. +- Prefer explicit test layers over ad hoc managed runtimes. Keep dependency provisioning visible in the test file. +- Use scoped fixtures and finalizers for resources that must be cleaned up, including temporary directories, flags, databases, fibers, servers, and global state. |
