diff --git a/src/layouts/service-location/helpers/object-cloning-helper/object-cloning-helper.spec.js b/src/layouts/service-location/helpers/object-cloning-helper/object-cloning-helper.spec.js index fead6ac20..4246f9167 100644 --- a/src/layouts/service-location/helpers/object-cloning-helper/object-cloning-helper.spec.js +++ b/src/layouts/service-location/helpers/object-cloning-helper/object-cloning-helper.spec.js @@ -51,7 +51,7 @@ describe("object-cloning-helper.js", () => { const array = [9, 8, 7, 6, 5, 4, 3, 2, 1]; - const expected = [9, 8, 7, 6, 5, 4, 3, 2, 1];; + const expected = [9, 8, 7, 6, 5, 4, 3, 2, 1]; // Act const result = deepClone(array); diff --git a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.spec.js b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.spec.js index cbe183537..755b0d870 100644 --- a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.spec.js +++ b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.spec.js @@ -4,8 +4,7 @@ import { storeActions } from "@/constants/store-actions"; const mockStoreActionGetMobileFeePart = storeActions.GET_MOBILE_FEE_PART; const mockStoreActionPriceOrderItemsAndSaveServerData = storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA; -const mockStoreActionGetServiceabilityDetails = - storeActions.GET_SERVICEABILITY_DETAILS; +const mockStoreActionGetServiceabilityDetails = storeActions.GET_SERVICEABILITY_DETAILS; jest.mock("@/mixins/base-mixin.js", () => ({ methods: { @@ -44,14 +43,12 @@ jest.mock("@/mixins/base-mixin.js", () => ({ } if (actionName === mockStoreActionGetServiceabilityDetails) { - return Promise.resolve( - { - isGlassServiceableInshop: true, - isRecalibrationServiceableInshop: true, - isGlassServiceableMobile: true, - isRecalibrationServiceableMobile: true - }, - ); + return Promise.resolve({ + isGlassServiceableInshop: true, + isRecalibrationServiceableInshop: true, + isGlassServiceableMobile: true, + isRecalibrationServiceableMobile: true, + }); } }), }, @@ -66,7 +63,7 @@ describe("service-location-helper.js", () => { const parentAccountNumber = 167132; const billToAccountNumber = 1234; const expected = null; - + // Act const result = await getPricedMobileFeePart( serviceZipCode, @@ -74,18 +71,18 @@ describe("service-location-helper.js", () => { parentAccountNumber, billToAccountNumber ); - + // Assert expect(result).toEqual(expected); }); - + it("Should return the priced mobile fee part", async () => { // Arrange const serviceZipCode = "43235"; const damageType = "Replace"; const parentAccountNumber = 167132; const billToAccountNumber = 1234; - + const expected = { partNumber: "MOBILE FEE", description: "MOBILE FEE", @@ -94,7 +91,7 @@ describe("service-location-helper.js", () => { sellingPrice: 0, kitPrice: 0, }; - + // Act const result = await getPricedMobileFeePart( serviceZipCode, @@ -102,7 +99,7 @@ describe("service-location-helper.js", () => { parentAccountNumber, billToAccountNumber ); - + // Assert expect(result).toEqual(expected); }); @@ -112,20 +109,19 @@ describe("service-location-helper.js", () => { it("Should return the serviceability details", async () => { // Arrange const serviceZipCode = "43235"; - + const expected = { isGlassServiceableInshop: true, isRecalibrationServiceableInshop: true, isGlassServiceableMobile: true, - isRecalibrationServiceableMobile: true + isRecalibrationServiceableMobile: true, }; - + // Act const result = await getServiceabilityDetails(serviceZipCode); - + // Assert expect(result).toEqual(expected); - }); + }); }); - }); diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 586fb6368..0073a9f65 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -540,7 +540,6 @@ describe("service-location.vue", () => { // Assert expect(wrapper.vm.selectedAppointmentType).toStrictEqual("Mobile"); }); - }); describe("serviceability logic", () => { diff --git a/src/layouts/service-location/shop-question/shop-question.spec.js b/src/layouts/service-location/shop-question/shop-question.spec.js index ab82500f7..c61fe2720 100644 --- a/src/layouts/service-location/shop-question/shop-question.spec.js +++ b/src/layouts/service-location/shop-question/shop-question.spec.js @@ -486,7 +486,6 @@ describe("shop-question.vue", () => { // Assert expect(wrapper.vm.answers.length).toEqual(3); }); - }); function setupMocks({ mountOptions, mixins, props, isShallowMount = true }) {