// Helper, that is used to forcibly finalize all promises // in thunk before running matcher against state. const executeThunk = async (thunk, dispatch, getState) => { await thunk(dispatch, getState); await new Promise(setImmediate); }; export default executeThunk;