Fix both sets of tests

This commit is contained in:
Iván Ovejero 2022-04-12 17:23:42 +02:00
parent 0844b911d9
commit a083914649

View file

@ -158,6 +158,7 @@ export function createAgent(
const agent = request.agent(app);
if (options?.apiPath === undefined || options?.apiPath === 'internal') {
agent.use(prefix(REST_PATH_SEGMENT));
if (options?.auth && options?.user) {
const { token } = issueJWT(options.user);
agent.jar.setCookie(`${AUTH_COOKIE_NAME}=${token}`);