effect-testing

Test Effect-based code with TestClock, @effect/vitest, and testcontainers.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/lucas-barake/dotai --skill effect-testing-lucas-barake
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-testing
Source: https://github.com/lucas-barake/dotai/tree/main/canonical/skills/effect-testing
Command: npx skills add https://github.com/lucas-barake/dotai --skill effect-testing-lucas-barake

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides testing patterns and utilities for Effect-based code, enabling reliable, deterministic tests across complex workflows.

Core Features & Use Cases

  • Deterministic timing with TestClock for time-sensitive effects
  • Layered test composition and reusable test helpers with effect layers
  • Property-based testing patterns using @effect/vitest to generate diverse inputs
  • Integration testing with testcontainers to validate database interactions
  • Mocking utilities for external services and AI prompt responses in tests

Quick Start

Run bun test to execute the effect-testing patterns and observe deterministic results.

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-based code deterministically?

You can test Effect-based code deterministically by using TestClock for time-sensitive effects and layered test composition to control execution flow. This ensures reliable outcomes across complex workflows without waiting for actual time to pass.

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

Yes, property-based testing is supported with Effect and Vitest through the @effect/vitest package. This allows you to generate diverse inputs automatically, ensuring your Effect-based applications handle a wide range of edge cases robustly.

What is the best way to mock external services in Effect tests?

The best way to mock external services in Effect tests is by using safe mocking patterns and effect layers. This approach allows you to isolate dependencies and simulate external service behaviors, including AI prompt responses, reliably.

How do I run integration tests for Effect apps using testcontainers?

You can run integration tests for Effect apps using testcontainers to validate database interactions in an isolated environment. This validates your application's database interactions against real instances without affecting your production data.

Does this Skill support testing complex workflows with effect layers?

Yes, this Skill supports testing complex workflows through layered test composition and reusable test helpers with effect layers. This allows you to build up test scenarios modularly, ensuring each layer of your application is validated correctly.

Why are my time-sensitive Effect tests failing intermittently?

Time-sensitive Effect tests often fail intermittently due to non-deterministic timing. Using TestClock resolves this by providing deterministic timing, allowing you to control and advance time manually in your tests for reliable execution.