Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
patzick committed Nov 14, 2019
1 parent 833a14a commit 8db6666
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ describe("CartService - addProductToCart", () => {
"400: FRAMEWORK__INVALID_UUID"
);
expect(mockedAxios.post).toBeCalledTimes(1);
expect(
mockedAxios.post
).toBeCalledWith("/checkout/cart/product/someNonExistingProductId", {
quantity: 1
});
expect(mockedAxios.post).toBeCalledWith(
"/checkout/cart/product/someNonExistingProductId",
{
quantity: 1
}
);
});

it("should throw unhandled 404 error when empty productId given", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ describe("CartService - changeCartItemQuantity", () => {
"400: CHECKOUT__CART_LINEITEM_NOT_FOUND"
);
expect(mockedAxios.patch).toBeCalledTimes(1);
expect(
mockedAxios.patch
).toBeCalledWith("/checkout/cart/line-item/someNonExistingLineItemId", {
quantity: 1
});
expect(mockedAxios.patch).toBeCalledWith(
"/checkout/cart/line-item/someNonExistingLineItemId",
{
quantity: 1
}
);
});

it("should throw unhandled 400 error when negative quantity given", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ describe("ProductService - getProduct", () => {
const productId = "044a190a54ab4f06803909c3ee8063ef";
const result = await getProduct(productId);
expect(mockedAxios.get).toBeCalledTimes(1);
expect(
mockedAxios.get
).toBeCalledWith("/product/044a190a54ab4f06803909c3ee8063ef", {
params: null
});
expect(mockedAxios.get).toBeCalledWith(
"/product/044a190a54ab4f06803909c3ee8063ef",
{
params: null
}
);
expect(result).toHaveProperty("id");
expect(result.id).toEqual(productId);
});
Expand Down

1 comment on commit 8db6666

@vercel
Copy link

@vercel vercel bot commented on 8db6666 Nov 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.