asyncredux-testing-basics
CommunityMaster unit tests for AsyncRedux with test Store.
System Documentation
What problem does it solve?
Testing AsyncRedux apps can be verbose and brittle. This Skill provides structured patterns and utilities to write reliable unit tests that exercise the Store, actions, and async flows.
Core Features & Use Cases
- Create test Stores with deterministic initial state for isolated tests.
- Dispatch actions using dispatchAndWait and dispatchAndWaitAll and assert the resulting state.
- Validate ActionStatus to detect success or failure and inspect errors.
- Use MockStore to isolate tests by replacing or suppressing actions.
- Use advanced wait utilities to coordinate complex async scenarios.
Quick Start
Create a test file with flutter_test and async_redux, build a simple Store, dispatch an action using dispatchAndWait, and assert the resulting state. For example:
import 'package:flutter_test/flutter_test.dart'; import 'package:async_redux/async_redux.dart';
void main() { test('increments counter', () async { var store = Store<AppState>(initialState: AppState(counter: 0)); await store.dispatchAndWait(IncrementAction()); expect(store.state.counter, 1); }); }
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: asyncredux-testing-basics Download link: https://github.com/marcglasberg/async_redux/archive/main.zip#asyncredux-testing-basics Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.