How to test Reflux actions with Jest
问题 I'm having difficulty testing that Reflux actions are triggering correctly in my application, and in fact they do not seem to be working at all with Jest. I have this example test: jest.autoMockOff(); describe('Test', function () { it('Tests actions', function () { var Reflux = require('../node_modules/reflux/index'); var action = Reflux.createAction('action'); var mockFn = jest.genMockFn(); var store = Reflux.createStore({ init: function () { this.listenTo(action, this.onAction); }, onAction