From a868c05ebeb04486c5ef05ee8d699e798c70f8cf Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Tue, 21 Oct 2025 15:24:58 -0400 Subject: [PATCH] Stabilize unit tests --- src/global-methods.spec.js | 2 +- src/router/methods/before-each.js | 2 +- src/router/methods/error.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/global-methods.spec.js b/src/global-methods.spec.js index c09bf8e97..c8c4d6da9 100644 --- a/src/global-methods.spec.js +++ b/src/global-methods.spec.js @@ -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) => { diff --git a/src/router/methods/before-each.js b/src/router/methods/before-each.js index 1796b40d7..67a6ecf84 100644 --- a/src/router/methods/before-each.js +++ b/src/router/methods/before-each.js @@ -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; } } diff --git a/src/router/methods/error.js b/src/router/methods/error.js index 551df4aed..42807ce04 100644 --- a/src/router/methods/error.js +++ b/src/router/methods/error.js @@ -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); } }