如何对是否已分派动作进行单元测试?
例如我有这个简单的方法
public openInfo()
{
this.store.dispatch(Infoactions.openInfo({
Configuration: {
message: 'This is an info message!'
}
}));
}
我需要编写一个单元测试来验证是否已分派动作:
it('should dispatch openInfo action',function () {
// how to check the dispactched actions and their parameters?
// expect(...)
});
如何检查已调度的动作?