【问题标题】:Setting JS Alt Store State For Testing Purposes为测试目的设置 JS Alt Store 状态
【发布时间】:2016-07-28 21:01:07
【问题描述】:

我想测试我的商店 - 检查商店的数据在操作后是否正确更改。 我无法更改通过 alt.dispatcher 的操作连接到的商店的状态。

alt store test method 对我不起作用 - 我在 mocha 测试文件中更改了 AltWrappedStore.state,但该操作连接到的商店状态不同(它显示默认状态)。 如何设置替代商店的状态以测试状态的变化(通过操作)?

【问题讨论】:

    标签: testing reactjs flux alt.js


    【解决方案1】:

    找到了! 我正在使用 Alt 的 bootstrap function 只需通过它设置商店的状态即可。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-30
      相关资源
      最近更新 更多