Files
test/backend/__tests__/__testData__/controller-test.ts
Benjamin Falch 2bc741fb78
Some checks failed
Mark Stale PRs / stale (push) Has been cancelled
adding monkeytype
2026-04-23 13:53:44 +02:00

18 lines
438 B
TypeScript

import request from "supertest";
import app from "../../src/app";
import { ObjectId } from "mongodb";
import { mockBearerAuthentication } from "./auth";
import { beforeEach } from "vitest";
export function setup() {
const mockApp = request(app);
const uid = new ObjectId().toHexString();
const mockAuth = mockBearerAuthentication(uid);
beforeEach(() => {
mockAuth.beforeEach();
});
return { mockApp, uid, mockAuth };
}