import { ActionToDispatch, ExpectFunction } from '../types' import { testUtilsContext } from '../plugin' import { tryToSearchActions } from './toDispatchActionsInAnyOrder' export const toNotHaveDispatchedActions: ExpectFunction = { common(logic, actions) { const { notFound } = tryToSearchActions(logic, actions) if (notFound.length !== actions.length) { throw new Error(`Found actions when we shouldn't have!`) } testUtilsContext().ranActions = true }, }