Skip to content

Commit

Permalink
Runs prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
supernova-at committed Apr 23, 2019
1 parent c009c59 commit 8025c0b
Showing 1 changed file with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('createCart', () => {
3,
actions.getCart.receive(storedCartId)
);

expect(request).not.toHaveBeenCalled();
});

Expand Down Expand Up @@ -265,7 +265,8 @@ describe('addItemToCart', () => {

/*
* Initial attempt will fail.
*/
*/

expect(dispatch).toHaveBeenNthCalledWith(
1,
actions.addItem.request(payload)
Expand All @@ -283,17 +284,23 @@ describe('addItemToCart', () => {
* And then the thunk is called again.
*/

expect(dispatch).toHaveBeenNthCalledWith(5, actions.addItem.request(payload));
expect(dispatch).toHaveBeenNthCalledWith(
5,
actions.addItem.request(payload)
);
// getCartDetails
expect(dispatch).toHaveBeenNthCalledWith(6, expect.any(Function));
// toggleDrawer
expect(dispatch).toHaveBeenNthCalledWith(7, expect.any(Function));
// addItem.receive
expect(dispatch).toHaveBeenNthCalledWith(8, actions.addItem.receive({
cartItem: undefined,
item: 'ITEM',
quantity: 1
}));
expect(dispatch).toHaveBeenNthCalledWith(
8,
actions.addItem.receive({
cartItem: undefined,
item: 'ITEM',
quantity: 1
})
);
});

test('its thunk uses the appropriate endpoint when user is signed in', async () => {
Expand Down

0 comments on commit 8025c0b

Please sign in to comment.