effect-concurrency-testing
Installation
SKILL.md
Effect Concurrency Testing Skill
This skill provides patterns for testing Effect's concurrency primitives: fibers, latches, deferreds, PubSub, SubscriptionRef, and streams.
Core Principles
CRITICAL: Choose the correct coordination primitive based on what you need to synchronize.
| Need | Use |
|---|---|
| Simple fiber yield | Effect.yieldNow |
| Forked PubSub subscriber ready | yieldNow after fork, yieldNow after each publish |
| Wait for subscriber ready | Deferred.make() + Deferred.await |
| Wait for stream element | Effect.makeLatch() + Stream.tap(() => latch.open) |
| Time-dependent behavior | TestClock.adjust |
| Verify events published | PubSub.subscribe + PubSub.takeAll |
| Check fiber status | fiber.unsafePoll() |