effect-testing

Test Effect applications with @effect/vitest, TestClock, and FastCheck.

68|13|Updated Aug 9, 2025
One-click install
npx skills add https://github.com/kriegcloud/beep-effect --skill effect-testing-kriegcloud
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-testing
Source: https://github.com/kriegcloud/beep-effect/tree/main/.repos/beep-effect/.repos/effect-orm/.claude/skills/effect-testing
Command: npx skills add https://github.com/kriegcloud/beep-effect --skill effect-testing-kriegcloud

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the process of writing comprehensive tests for Effect-based applications, ensuring the reliability and correctness of your code.

Core Features & Use Cases

  • Dual Framework Support: Utilize @effect/vitest for Effect-specific testing and standard vitest for pure functions.
  • Environment Control: Easily switch between test environments (it.effect, it.live, it.scoped, it.scopedLive).
  • Advanced Testing: Implement property-based testing, time-dependent tests with TestClock, and robust error handling verification.
  • Use Case: When developing a new Effect service, use this Skill to write unit tests that cover various scenarios, including dependency injection, asynchronous operations, and error conditions, ensuring the service behaves as expected under different circumstances.

Quick Start

Use the effect-testing skill to write a test for the provided Effect function myEffectFunction.

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 services and functions?

Unit testing Effect services involves using `@effect/vitest` to handle dependency injection, asynchronous operations, and error conditions within your Effect codebase.

What is the best way to test time-dependent operations in Effect?

Testing time-dependent operations in Effect requires the `TestClock` to control and deterministically verify time-based effects without relying on real asynchronous delays.

Can I use standard vitest for pure functions in an Effect application?

Standard `vitest` can be used alongside `@effect/vitest` to test pure functions, while Effect-specific environments handle complex scenarios like dependency injection and layers.

How do I switch between test environments for Effect code?

Switching test environments for Effect code is done using specific functions like `it.effect`, `it.live`, `it.scoped`, and `it.scopedLive` to control execution contexts.

Does Effect support property-based testing with FastCheck?

Effect supports property-based testing through `FastCheck` integration, allowing you to generate randomized test cases to verify the correctness of your functions across various scenarios.