LogoClawIndex
案例技能关于
LogoClawIndex

asyncredux-testing-basics - 使用 Store 直接测试 AsyncRedux Action

指导使用 Store 为 AsyncRedux Action 编写单元测试,涵盖状态断言、异步动作、ActionStatus 及 MockStore。

标签

更新于: 2026-09-21

能力

典型输入

典型输出

该技能可以做什么

  • 创建测试 Store
  • 分发并等待 Action
  • 测试异步 Redux Action
  • 并行分发多个 Action
  • 使用 ActionStatus 验证错误
  • 测试 UserException 异常
  • 检查 Store 错误队列
  • 验证出错时状态保持不变
  • 使用 MockStore 模拟 Action
  • 等待特定状态条件

输入

  • ReduxAction 类
  • 初始 AppState 状态
  • 测试数据

输出

  • 更新后的 AppState
  • ActionStatus 对象
  • Store 错误队列记录
  • 测试断言结果

要求

  • Flutter 测试框架
  • async_redux 软件包

来源

  • 规范: SKILL.md

ClawIndex

OpenClaw Skills 与 Use Case 索引

ClawIndex 是一个生态驱动的 OpenClaw Skills 与真实 Use Case 索引站。

索引

Skills·
Cases

Meta

关于·
声明·
邮箱·
GitHub
© 2026 ClawIndex 保留所有权利。
flutter
async-redux
单元测试
dart
状态管理
创建测试 Store
分发并等待 Action
测试异步 Redux Action
并行分发多个 Action
ReduxAction 类
初始 AppState 状态
测试数据
更新后的 AppState
ActionStatus 对象
Store 错误队列记录