Stabilize unit tests
This commit is contained in:
parent
7aecf03856
commit
a868c05ebe
3 changed files with 4 additions and 4 deletions
|
|
@ -38,7 +38,7 @@ it("Global Methods - Call Http Client - Should Reject Promise", () => {
|
|||
isError: true,
|
||||
});
|
||||
analyticsMixIn.methods.pushEventToGA = jest.fn();
|
||||
router.bailout = jest.fn();
|
||||
router.handleSoftError = jest.fn();
|
||||
|
||||
//Act
|
||||
globalMethods.callHttpClient(httpArgs).catch((err) => {
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ export async function beforeEach(to, from) {
|
|||
console.log(error);
|
||||
|
||||
// Eject user from Vue app in this scenario and clear localstorage.
|
||||
handleHardError(errorPayload);
|
||||
await handleHardError(errorPayload);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ export async function handleHardError(errorPayload) {
|
|||
window.top.location = "/fmg/static/error";
|
||||
return;
|
||||
} else {
|
||||
handleSoftError(errorPayload, true);
|
||||
await handleSoftError(errorPayload, true);
|
||||
return;
|
||||
}
|
||||
} finally {
|
||||
handleSoftError(errorPayload, true);
|
||||
await handleSoftError(errorPayload, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue