SSR-1373 Fix unit tests
This commit is contained in:
parent
0d944f155d
commit
453b8e630a
1 changed files with 3 additions and 16 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue