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,
|
isError: true,
|
||||||
});
|
});
|
||||||
analyticsMixIn.methods.pushEventToGA = jest.fn();
|
analyticsMixIn.methods.pushEventToGA = jest.fn();
|
||||||
router.bailout = jest.fn();
|
router.handleSoftError = jest.fn();
|
||||||
|
|
||||||
//Act
|
//Act
|
||||||
globalMethods.callHttpClient(httpArgs).catch((err) => {
|
globalMethods.callHttpClient(httpArgs).catch((err) => {
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ export async function beforeEach(to, from) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
||||||
// Eject user from Vue app in this scenario and clear localstorage.
|
// Eject user from Vue app in this scenario and clear localstorage.
|
||||||
handleHardError(errorPayload);
|
await handleHardError(errorPayload);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,10 @@ export async function handleHardError(errorPayload) {
|
||||||
window.top.location = "/fmg/static/error";
|
window.top.location = "/fmg/static/error";
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
handleSoftError(errorPayload, true);
|
await handleSoftError(errorPayload, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
handleSoftError(errorPayload, true);
|
await handleSoftError(errorPayload, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue