What problem does it solve?
Testing Effect-based code can be complex due to asynchronous effects, layering of services, and ensuring type-safe expectations across runs. This skill provides guidelines and patterns to write, review, and maintain tests for Effect values, layers, and related utilities.
Core Features & Use Cases
- Use @effect/vitest for effect-based tests to ensure consistent execution semantics.
- Apply type-safe assertions with tsafe to validate compile-time type correctness.
- Employ DateTime.now in tests instead of new Date to avoid flaky time-based behavior.
- Decode unknown values with decodeUnknown from zerospin and map errors to ZerospinError in both generator-based and async contexts.
Quick Start
Install the recommended testing packages (such as @effect/vitest, tsafe, zerospin, and effect) and begin applying the patterns in your test suites.