我试图弄清楚如何使用 Jasmine测试 Reflux 商店( https://github.com/spoike/refluxjs )。runAllTimes
基本上,这个问题的等价物,除了我所知道的没有等价物: How to test Reflux actions with Jest
it('responds to the doTheThing action and triggers afterward', function() {
var spyFn = jasmine.createSpy('spy');
MyStore.listen(spyFn);
MyActions.doTheThing();
// with Jest, I would call jest.runAllTimers() here
expect(spyFn).toHaveBeenCalled();
});
^ 这失败了,它应该返回 true。
所以:有人知道如何使用 Jasmine 测试 Reflux 商店吗?