Skip to content

Instantly share code, notes, and snippets.

@jtmthf
Created May 17, 2018 20:44
Show Gist options
  • Save jtmthf/0ea8e2d7ca004c676070a524359643cc to your computer and use it in GitHub Desktop.
Save jtmthf/0ea8e2d7ca004c676070a524359643cc to your computer and use it in GitHub Desktop.
const next = jest.fn();
const baseAction = {
type: OrderDetailsActionConstants.INITIATE_ORDER_DETAILS_RETRIEVAL,
orderId: 'orderId',
patientId: 'patientId',
encounterId: 'encounterId'
};
const action = Object.assign({}, baseAction, toRemove: 'toRemove');
serializeInitiateOrderDetailsRetrievalAction()(next)(action);
expect(next.mock.calls.length).toBe(1);
expect(next.mock.calls[0].length).toBe(1);
expect(next.mock.calls[0][0]).toEqual(baseAction);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment