refactor(backend): Functions

This commit is contained in:
Tibo De Peuter 2025-03-22 18:38:38 +01:00
parent 5ec62554e3
commit 65c1a5e6b6
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
57 changed files with 172 additions and 117 deletions

View file

@ -69,7 +69,7 @@ export function expectToBeCorrectEntity<T extends object>(actual: { entity: T; n
* @param filtered the representation as FilteredLearningObject
* @param original the original entity added to the database
*/
export function expectToBeCorrectFilteredLearningObject(filtered: FilteredLearningObject, original: LearningObject) {
export function expectToBeCorrectFilteredLearningObject(filtered: FilteredLearningObject, original: LearningObject): void {
expect(filtered.uuid).toEqual(original.uuid);
expect(filtered.version).toEqual(original.version);
expect(filtered.language).toEqual(original.language);
@ -105,7 +105,7 @@ export function expectToBeCorrectLearningPath(
learningPath: LearningPath,
expectedEntity: LearningPathEntity,
learningObjectsOnPath: FilteredLearningObject[]
) {
): void {
expect(learningPath.hruid).toEqual(expectedEntity.hruid);
expect(learningPath.language).toEqual(expectedEntity.language);
expect(learningPath.description).toEqual(expectedEntity.description);