Created
June 21, 2016 09:20
-
-
Save nemisj/6259c82d65341ebcbc22494040350fd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createMockActionContext = require('fluxible/utils').createMockActionContext; | |
module.exports = function (opts, contextMethods) { | |
const mockContext = createMockActionContext(opts); | |
const dispatcher = mockContext.dispatcherContext.dispatcher; | |
mockContext.dispatcherContext = dispatcher.createContext(contextMethods); | |
return mockContext; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createMockActionContext = require('./create-mock-context.js'); | |
createMockActionContext({ | |
stores: [] | |
}, { | |
pluginMethod() { | |
// implement mock for plugin method | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment