Effect Testing

Test Effect framework applications with fibers, mocks, and deterministic time.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/harrytran998/crossfire --skill effect-testing-harrytran998
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Effect Testing
Source: https://github.com/harrytran998/crossfire/tree/main/.agents/skills/effect-testing
Command: npx skills add https://github.com/harrytran998/crossfire --skill effect-testing-harrytran998

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides comprehensive guidance and examples for effectively testing applications built with the Effect framework, ensuring code quality and reliability.

Core Features & Use Cases

  • Effect Testing Layer: Learn to use Effect's built-in testing utilities for deterministic and type-safe tests.
  • Fiber-Level Testing: Understand how to test concurrent operations, including forking, joining, and interruption.
  • Mock Services: Discover techniques for replacing real services with test implementations to isolate components and verify interactions.
  • Deterministic Time: Control time in tests to verify timing-sensitive logic and timeouts.
  • Property-Based Testing: Leverage @effect/schema for robust validation and testing of data structures.
  • Use Case: A developer needs to write unit tests for a complex Effect-based service that interacts with external APIs. This Skill provides the patterns and code examples to mock the API calls, test error handling, and ensure concurrent operations behave as expected.

Quick Start

Use the Effect Testing skill to learn how to write basic tests for Effect applications.

Frequently Asked Questions about Effect Testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write unit tests for Effect framework services using TypeScript?

To write unit tests for Effect framework services, use the built-in testing layer utilities to isolate dependencies. This ensures deterministic, type-safe tests by allowing you to mock external APIs and verify error handling.

What is the best way to test concurrent operations and fibers in Effect?

Testing concurrent operations in Effect requires fiber-level testing patterns. You can verify forking, joining, and interruption behavior to ensure your concurrent logic behaves as expected under different timing conditions.

How do I mock external services when testing Effect applications?

Mock services in Effect applications by replacing real service implementations with test versions. This isolates components for verification and allows you to test interactions with external APIs without making actual network calls.

Can I control time for deterministic testing of timeouts in the Effect framework?

Yes, you can achieve deterministic time testing in the Effect framework. Controlling time allows you to verify timing-sensitive logic and test timeout behaviors reliably without waiting for actual delays.

Does Effect support property-based testing with @effect/schema?

Effect supports property-based testing through @effect/schema integration. This allows you to perform robust validation and generate test cases for data structures, ensuring comprehensive coverage of edge cases.