refactor(frontend): Start test-app voor individuele testfiles

This commit is contained in:
Tibo De Peuter 2025-04-21 12:44:39 +02:00
parent 196875538d
commit e59dead5a9
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
2 changed files with 23 additions and 7 deletions

View file

@ -1,8 +1,19 @@
import { StudentController } from "../../src/controllers/students";
import { expect, it } from "vitest";
import { expect, it, describe, afterAll, beforeAll } from 'vitest';
import { setup, teardown } from '../setup-backend.js';
it("Get students", async () => {
const controller = new StudentController();
const data = await controller.getAll(true);
expect(data.students).to.have.length.greaterThan(0);
describe('Test controller students', () => {
beforeAll(async () => {
await setup();
});
afterAll(async () => {
await teardown();
});
it("Get students", async () => {
const controller = new StudentController();
const data = await controller.getAll(true);
expect(data.students).to.have.length.greaterThan(0);
});
});