From c6a15910c170a7bac7299f46345e5f82e90756b5 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Sat, 17 Aug 2024 07:23:15 -0400 Subject: [PATCH] prettier --- src/fmg-components/cart/cart.spec.js | 72 ++++++++++++++-------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/fmg-components/cart/cart.spec.js b/src/fmg-components/cart/cart.spec.js index 40255f322..10207c8bb 100644 --- a/src/fmg-components/cart/cart.spec.js +++ b/src/fmg-components/cart/cart.spec.js @@ -265,47 +265,47 @@ describe("cart.vue", () => { // Mobile Fee Cart Item test("if there is mobile fee on the order, a mobile fee cart item should be added to the cart", () => { - // Arrange - const lineItems = { - glassParts: [], - supportingItems: [ - { - description: null, - id: "9ff98501-03a4-432b-884e-e4e28f884a2f", - kitPrice: 0, - laborAmount: 34.98, - partNumber: "MOBILE FEE", - partType: "MOBILE FEE", - salesTax: 2.62, - sellingPrice: 0, + // Arrange + const lineItems = { + glassParts: [], + supportingItems: [ + { + description: null, + id: "9ff98501-03a4-432b-884e-e4e28f884a2f", + kitPrice: 0, + laborAmount: 34.98, + partNumber: "MOBILE FEE", + partType: "MOBILE FEE", + salesTax: 2.62, + sellingPrice: 0, + }, + ], + vaps: [], + promos: [], + }; + + const availableVaps = []; + + // Act + const { wrapper } = setupMocks({ + props: { + modelValue: lineItems, + availableVaps: availableVaps, }, - ], - vaps: [], - promos: [], - }; + }); - const availableVaps = []; + // Assert + expect(wrapper.vm.mobileFeeCartItem).not.toBeNull(); + expect(wrapper.vm.mobileFeeCartItem.subTotal).toEqual(34.98); + expect(wrapper.vm.mobileFeeCartItem.salesTax).toEqual(2.62); - // Act - const { wrapper } = setupMocks({ - props: { - modelValue: lineItems, - availableVaps: availableVaps, - }, + const found = + wrapper.vm.cartItems.findIndex( + (cartItem) => cartItem == wrapper.vm.mobileFeeCartItem + ) >= 0; + expect(found).toBe(true); }); - // Assert - expect(wrapper.vm.mobileFeeCartItem).not.toBeNull(); - expect(wrapper.vm.mobileFeeCartItem.subTotal).toEqual(34.98); - expect(wrapper.vm.mobileFeeCartItem.salesTax).toEqual(2.62); - - const found = - wrapper.vm.cartItems.findIndex( - (cartItem) => cartItem == wrapper.vm.mobileFeeCartItem - ) >= 0; - expect(found).toBe(true); - }); - // Service package discount Fee Cart Item test("if there is service package discount fee on the order, a service package discount cart item should be added to the cart", () => { // Arrange