mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
Refactor UserAuthorization test; improve formatting of mock setup for clarity
This commit is contained in:
parent
20b5e43b26
commit
a0d77ac104
@ -281,9 +281,10 @@ describe("UserMiddleware", () => {
|
||||
projectId,
|
||||
);
|
||||
getJestSpyOn(ProjectMiddleware, "hasApiKey").mockReturnValue(false);
|
||||
getJestSpyOn(UserMiddleware, "getAccessTokenFromExpressRequest").mockReturnValue(
|
||||
mockedAccessToken,
|
||||
);
|
||||
getJestSpyOn(
|
||||
UserMiddleware,
|
||||
"getAccessTokenFromExpressRequest",
|
||||
).mockReturnValue(mockedAccessToken);
|
||||
getJestSpyOn(JSONWebToken, "decode").mockReturnValue(jwtTokenData);
|
||||
getJestSpyOn(HashedString, "hashValue").mockResolvedValue(hashValue);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user