Testing Schema Validation
Schema decode is pure. Test directly:Testing with Either
UsedecodeEither to test error cases without throwing:
Mocking Services
UseTestTransport to mock JSON-RPC responses:
Testing Error Paths
Mock errors usingTransportError in TestTransport:
Testing Crypto
UseCryptoTest layer for deterministic crypto outputs:
CryptoLive and CryptoTest
UseCryptoLive for production and CryptoTest for deterministic unit tests:
Composing Test Layers
Combine transport and crypto test layers:Integration Tests
Use live layers for integration tests:See Also
- Effect Testing — Official Effect testing guide
- Dependency Injection — How services work
- Layers — Layer composition patterns
- Crypto — CryptoLive and CryptoTest layers
- Debugging — Debug Effect programs
- Troubleshooting — Common issues and solutions

