duraflows-tester

Validate duraflows workflows with Vitest tests using in-memory doubles and fixed clocks.

4|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/camcima/duraflows --skill duraflows-tester
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: duraflows-tester
Source: https://github.com/camcima/duraflows/tree/main/skills/duraflows-tester
Command: npx skills add https://github.com/camcima/duraflows --skill duraflows-tester

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide provides structured testing patterns for validating duraflows workflows using Vitest, enabling deterministic, self-contained tests that do not require real databases or external services.

Core Features & Use Cases

  • In-memory test doubles for instances and history, clock injection for timeouts, and mock commands to simulate success, failure, and best-effort outcomes.
  • Comprehensive test patterns for command registration, onEnter chains, guards (including ref-name validation), observers, and timeout processing across multiple scenarios.
  • Use cases include unit tests for state transitions, timeout-driven moves, guard decisions, and observer correlation, all with reproducible results.

Quick Start

Write Vitest tests that create an in-memory runtime, inject a fixed clock, mock commands, and assert the correct state transitions and history.

Frequently Asked Questions about duraflows-tester

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

FAQPage Schema
How do I test duraflows workflows deterministically without a real database?

You can test duraflows workflows deterministically by using Vitest with in-memory test doubles for instances and history, eliminating the need for real databases or external services. This approach ensures reproducible state transitions and test outcomes.

How do I validate state transitions and timeouts in Vitest for workflow testing?

Validating state transitions and timeouts in Vitest involves injecting a fixed clock to control time-based moves and using mock commands to assert correct history. This pattern verifies guard decisions and timeout processing across multiple scenarios reproducibly.

Can I use Vitest mocking to simulate command success and failure in workflow tests?

Yes, Vitest mocking can simulate command success, failure, and best-effort outcomes for workflow tests. Mock commands replace real dependencies, allowing you to verify observer correlation and onEnter chains in a controlled environment.

What's the best way to test workflow guards and ref-name validation using in-memory doubles?

The best way to test workflow guards and ref-name validation is by setting up an in-memory runtime with Vitest. This self-contained environment allows you to exercise guard decisions and verify ref-name validation logic without external service dependencies.

Does duraflows testing with Vitest require any external dependencies or running services?

No, duraflows testing with Vitest does not require external dependencies or running services. Tests are fully self-contained, relying on in-memory test doubles, fixed clocks, and mock commands to verify state transitions and observers deterministically.

Why are my workflow timeout tests flaky when using real time instead of a fixed clock?

Workflow timeout tests become flaky with real time because actual execution delays cause non-deterministic behavior. Injecting a fixed clock in Vitest allows you to control timeout processing and verify time-driven state transitions reproducibly.