effect-testing

Run Effect programs directly in Vitest tests with it.effect variants.

5|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/agentxm/axm --skill effect-testing-agentxm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-testing
Source: https://github.com/agentxm/axm/tree/main/.axm/extensions/%40axm/skills/effect-testing/src
Command: npx skills add https://github.com/agentxm/axm --skill effect-testing-agentxm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Effect testing with Vitest enables developers to write tests that run Effect programs directly, avoiding unnecessary bridging to Promise-land and keeping all logic inside the Effect environment for clarity and correctness.

Core Features & Use Cases

  • Runs Effect programs directly in tests without bridging to Promise-land.
  • Supports multiple test shapes (it.effect, it.live, it.scoped, and variants) to cover synchronous and asynchronous flows.
  • Provides test layers via Effect.provide to inject services and resources into tests.
  • Supports robust error testing with Effect.flip and Effect.exit to validate success and failure paths.
  • Ideal for TypeScript projects using the Effect library to assert pure functional behavior in tests.

Quick Start

Install @effect/vitest in your project and start writing tests that stay in the Effect-land.

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 programs in Vitest without bridging to Promise-land?

Testing Effect programs in Vitest without bridging to Promise-land requires running effects directly in-context using it.effect variants. This approach keeps all logic inside the Effect environment for clarity and correctness.

How do I provide test layers to inject services into Effect tests?

To provide test layers and inject services into Effect tests, use Effect.provide within your Vitest test setup. This supplies necessary resources and dependencies directly to the effect runtime.

Can I assert failure paths in Effect tests using Effect.flip and Effect.exit?

Asserting failure paths in Effect tests is fully supported using Effect.flip and Effect.exit. These functions validate both success and failure outcomes directly within the Vitest environment.

What is the best way to run asynchronous Effect flows in Vitest?

Running asynchronous Effect flows in Vitest is best handled using it.live and it.scoped test variants. These shapes cover asynchronous execution and resource management without leaving Effect-land.

Does Effect testing with Vitest support TypeScript integration tests?

Effect testing with Vitest fully supports TypeScript integration tests and unit tests. It enables asserting pure functional behavior directly within TypeScript projects using the Effect library.