test(frontend): Coverage verbeteren
This commit is contained in:
parent
c47da0c826
commit
4a6b6ee061
10 changed files with 387 additions and 16 deletions
21
frontend/tests/controllers/learning-paths-controller.test.ts
Normal file
21
frontend/tests/controllers/learning-paths-controller.test.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { beforeEach, describe, expect, it } from 'vitest';
|
||||
import { LearningPathController } from '../../src/controllers/learning-paths';
|
||||
import { Language } from '../../src/data-objects/language';
|
||||
|
||||
describe("Test controller learning paths", () => {
|
||||
let controller: LearningPathController;
|
||||
|
||||
beforeEach(async () => {
|
||||
controller = new LearningPathController();
|
||||
});
|
||||
|
||||
it("Can search for learning paths", async () => {
|
||||
const data = await controller.search("kiks", Language.Dutch);
|
||||
expect(data).to.have.length.greaterThan(0);
|
||||
});
|
||||
|
||||
it("Can get learning path by id", async () => {
|
||||
const data = await controller.getAllByTheme("kiks");
|
||||
expect(data).to.have.length.greaterThan(0);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue