2
我想弄清楚如何用Jasmine測試Reflux商店(https://github.com/spoike/refluxjs)。基本上,這個問題相當於,除了一個事實,即沒有相當於runAllTimes
我所知道的:How to test Reflux actions with Jest用茉莉花測試Reflux商店
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。
因此:任何人都知道如何使用茉莉花測試迴流店?