effect-testing

Test Effect.ts success and failure paths with deterministic concurrency handling.

3|Updated Jul 30, 2024
One-click install
npx skills add https://github.com/nounder/dotfiles --skill effect-testing-nounder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-testing
Source: https://github.com/nounder/dotfiles/tree/main/claude/skills/effect-testing
Command: npx skills add https://github.com/nounder/dotfiles --skill effect-testing-nounder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing reliable tests for Effect.ts code to guarantee correct handling of success, failure, and concurrency scenarios.

Core Features & Use Cases

  • Validates error handling and propagation in Effect-based computations.
  • Demonstrates deterministic testing of time-sensitive and concurrent effects (sleep, fork, join).
  • Provides practical examples to guide test authors in creating robust unit tests for Effect.ts.

Quick Start

Write a test that asserts a failing Effect path is handled as expected.

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.ts error handling and failure paths?

Testing Effect.ts error handling requires asserting that failing computations propagate errors as expected within a deterministic test harness. You validate both success and failure paths by integrating these assertions directly into your existing unit test frameworks.

What is the best way to unit test concurrency in Effect.ts?

Unit testing concurrency in Effect.ts involves using a deterministic test harness to validate time-sensitive operations. You can test concurrent behaviors like sleep, fork, and join to ensure expected outcomes without flaky timing issues in your test automation suite.

How do I write deterministic tests for time-sensitive Effect.ts operations?

Deterministic tests for time-sensitive Effect.ts operations use a controlled test harness to manage concurrency. This approach validates sleep, fork, and join behaviors precisely, ensuring your unit tests confirm expected outcomes without relying on actual system time delays.

Can I integrate Effect.ts tests with existing TypeScript test frameworks?

Yes, you can integrate Effect.ts tests with existing TypeScript test frameworks. The approach validates expected outcomes for both success and failure paths, allowing your unit tests to run seamlessly within your current test automation environment.

Why are my Effect.ts unit tests failing to validate concurrent behaviors?

Effect.ts unit tests for concurrency fail when not using a deterministic test harness. To validate time-sensitive operations like fork and join correctly, ensure your tests cover both success and failure paths while controlling execution timing deterministically.