Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const expect = require('expect');
const createMockStore = require('redux-logic-test').default.createMockStore;
const createLogic = require('redux-logic').default.createLogic;
const fooLogic = createLogic({
type: 'FOO',
process(deps, dispatch, done) {
const API = deps.API;
API.get()
.then(results => {
dispatch({ type: 'FOO_SUCCESS', payload: results });
done();
});
}
});
const api = {
get() { return Promise.resolve(42); }
};