asyncredux-testing-view-models

Test AsyncRedux view-models in isolation using Vm.createFrom() with a Store.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/pro100andrey/dar --skill asyncredux-testing-view-models-pro100andrey
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: asyncredux-testing-view-models
Source: https://github.com/pro100andrey/dar/tree/main/.claude/skills/asyncredux-testing-view-models
Command: npx skills add https://github.com/pro100andrey/dar --skill asyncredux-testing-view-models-pro100andrey

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Testing view-models in isolation without building widgets, enabling faster, deterministic validation of properties and callbacks.

Core Features & Use Cases

  • Isolated testing of VmFactory outputs
  • Verify view-model properties derived from state
  • Validate callbacks dispatch actions and affect state

Quick Start

Create a Store with an initial AppState and instantiate the view-model using Vm.createFrom(store, yourFactory) to verify properties and callbacks.

Frequently Asked Questions about asyncredux-testing-view-models

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

FAQPage Schema
How do I test AsyncRedux view-models in Flutter without building widgets?

Test AsyncRedux view-models in isolation by creating them with Vm.createFrom() and verifying state-derived properties and callbacks against a Store. This avoids building UI widgets, enabling faster and deterministic validation of your Flutter app's state logic.

How do I verify that my view-model callbacks dispatch actions to the Store in unit tests?

Verify view-model callbacks by instantiating them via Vm.createFrom(store, yourFactory) and asserting that wired actions like IncrementAction or FetchAction affect the AppState. This confirms your callbacks dispatch actions correctly without requiring a widget test.

Can I test VmFactory outputs against a specific initial AppState in Flutter unit tests?

Yes, you can test VmFactory outputs by creating a Store with a specific initial AppState and instantiating the view-model using Vm.createFrom(store, yourFactory). This allows you to validate state-derived properties deterministically in isolation.

What do I need to set up before testing AsyncRedux view-models in isolation?

You need a Store, an AppState, and a VmFactory-derived ViewModel created via Vm.createFrom(). Once these are configured, you can test callbacks and properties against the Store in your Flutter unit tests without UI dependencies.

Why should I test Flutter view-models in isolation instead of using widget tests?

Testing view-models in isolation provides faster, deterministic validation of properties and callbacks without the overhead of building UI widgets. It directly checks state-derived properties and dispatch behavior against a Store, ensuring your AsyncRedux logic is correct.

Does AsyncRedux view-model testing work for validating state-derived properties without UI dependencies?

Yes, AsyncRedux view-model testing validates state-derived properties by using Vm.createFrom() with a Store and AppState. It completely bypasses UI widget building, allowing you to focus purely on verifying state logic and dispatch behavior in isolation.