Merge remote-tracking branch 'origin/dev' into feat/indieningen-kunnen-posten-en-bekijken-#194
# Conflicts: # backend/tests/setup-tests.ts
This commit is contained in:
commit
dd2cdf3fe9
46 changed files with 1670 additions and 123 deletions
|
@ -15,7 +15,14 @@ export const TEST_STUDENTS = [
|
|||
{ username: 'testleerling1', firstName: 'Gerald', lastName: 'Schmittinger' },
|
||||
];
|
||||
|
||||
let testStudents: Student[];
|
||||
|
||||
// 🏗️ Functie die ORM entities maakt uit de data array
|
||||
export function makeTestStudents(em: EntityManager): Student[] {
|
||||
return TEST_STUDENTS.map((data) => em.create(Student, data));
|
||||
testStudents = TEST_STUDENTS.map((data) => em.create(Student, data));
|
||||
return testStudents;
|
||||
}
|
||||
|
||||
export function getTestleerling1(): Student {
|
||||
return testStudents.find(it => it.username == "testleerling1");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue