effect-testing

Automate Effect-based application tests with @effect/vitest and vitest.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/front-depiction/claude-setup --skill effect-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-testing
Source: https://github.com/front-depiction/claude-setup/tree/main/skills/effect-testing
Command: npx skills add https://github.com/front-depiction/claude-setup --skill effect-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured approach to testing Effect-based applications using @effect/vitest and vitest, ensuring reliable behavior for services, layers, and time-dependent effects.

Core Features & Use Cases

  • Guided testing approach: covers Effect-based functions, services, and layers, including time-dependent testing with TestClock.
  • Property-based and error handling tests: demonstrates property-based tests and using Effect.flip/Exit for error scenarios.
  • Use Case: author test suites that validate layered service compositions and effectful computations across time and failure scenarios.

Quick Start

Install the testing libraries and begin writing tests using it.effect and it.effect.prop. Provide test layers for dependencies and leverage TestClock for time control. Run tests with your project test command.

Frequently Asked Questions about effect-testing

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

FAQPage Schema
How do I test Effect services and layers using Vitest?

To test Effect services and layers using Vitest, you provide test layers for dependencies and write tests using it.effect to validate effectful computations. This ensures reliable behavior for layered service compositions in your application.

How do I control time when testing time-dependent effects?

You control time when testing time-dependent effects by leveraging TestClock. This allows you to deterministically adjust time within your tests to validate time-based behavior without waiting for actual system time to pass.

Can I use property-based testing with Effect and Vitest?

Yes, you can use property-based testing with Effect and Vitest by utilizing the it.effect.prop function. This demonstrates property-based tests to validate that your pure code paths uphold expected invariants across generated inputs.

What is the best way to test error handling scenarios in Effect applications?

The best way to test error handling scenarios in Effect applications is by using Effect.flip and Exit within your Vitest test suites. This approach allows you to assert failure scenarios and validate effectful computations across error paths.

Do I need @effect/vitest to test Effect-based applications?

Yes, you need @effect/vitest and vitest installed in your project to test Effect-based applications. These libraries provide the structured approach and necessary functions like it.effect to author reliable test suites for your services.

How do I author test suites for layered service compositions in Effect?

You author test suites for layered service compositions by applying test layers to dependencies and using it.effect to run the effectful computations. This validates the behavior of services across time and failure scenarios.