fix(backend): Testen DatabaseLearningPathProvider en LearningPathService gerepareerd na refactoring.

This commit is contained in:
Gerald Schmittinger 2025-04-16 09:08:23 +02:00
parent 1815371a7b
commit c624e36680
6 changed files with 163 additions and 204 deletions

View file

@ -133,7 +133,7 @@ export function expectToBeCorrectLearningPath(
const expectedNode = [...expectedLearningPathNodes.entries()].find(
([key, _]) => key.learningObjectHruid === nodeKey.learningObjectHruid && key.language === node.language && key.version === node.version
)![1];
expect(node.start_node).toEqual(expectedNode.startNode);
expect(Boolean(node.start_node)).toEqual(Boolean(expectedNode.startNode));
expect(new Set(node.transitions.map((it) => it.next.hruid))).toEqual(
new Set(expectedNode.transitions.map((it) => it.next.learningObjectHruid))