fix: Auth.api user limit test expecting incorrect status (#6836)

fix: auth.api user limit test expecting incorrect status
This commit is contained in:
Val
2023-08-03 13:03:26 +01:00
committed by GitHub
parent 732416f52f
commit 371bfa0f48
2 changed files with 11 additions and 7 deletions

View File

@@ -93,10 +93,8 @@ function createAgent(app: express.Application, options?: { auth: boolean; user:
const agent = request.agent(app);
void agent.use(prefix(REST_PATH_SEGMENT));
if (options?.auth && options?.user) {
try {
const { token } = issueJWT(options.user);
agent.jar.setCookie(`${AUTH_COOKIE_NAME}=${token}`);
} catch {}
const { token } = issueJWT(options.user);
agent.jar.setCookie(`${AUTH_COOKIE_NAME}=${token}`);
}
return agent;
}