SSR-1373 Fix unit tests

This commit is contained in:
Josh Dassinger 2024-06-24 13:57:33 -05:00
parent 0d944f155d
commit 453b8e630a

View file

@ -28,8 +28,6 @@ function setupMocks({
isZipServiceable = true,
lookupVinByPlateResponse,
partsOrQuestions = [],
vehicle = {},
vin = null,
carId = 'C0000',
vinLookupResponseError = null,
route = null
@ -47,7 +45,8 @@ function setupMocks({
vehicle: {
carId: 'CARID'
}
}
},
error: vinLookupResponseError
}));
useMainStore().getPartsOrQuestions = jest.fn().mockImplementation(() => Promise.resolve({
@ -78,19 +77,7 @@ function setupMocks({
})
);
const apiResponses = {
serviceZipValidationResponse: {
isValid: isZipValid,
isServiceable: isZipServiceable
},
vinLookupResponse: {
vin,
vehicle,
error: vinLookupResponseError
}
};
settleAllPromises.mockImplementation(() => apiResponses);
settleAllPromises.mockImplementation(() => Promise.resolve({}));
wrapper.vm.getCmsContent = jest.fn().mockImplementation(() => '');
wrapper.vm.setCmsContent = jest.fn();