Stabilize unit tests

This commit is contained in:
Chloe Herd 2025-10-21 15:24:58 -04:00
parent 7aecf03856
commit a868c05ebe
3 changed files with 4 additions and 4 deletions

View file

@ -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) => {

View file

@ -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;
}
}

View file

@ -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);
}
}