style: fix linting issues met ESLint

This commit is contained in:
Lint Action 2025-03-11 10:59:51 +00:00
parent 31f994167d
commit dd21f46162
3 changed files with 6 additions and 8 deletions

View file

@ -112,9 +112,9 @@ async function convertNodes(
function optionalJsonStringToObject(jsonString?: string): object | null {
if (!jsonString) {
return null;
} else {
}
return JSON.parse(jsonString);
}
}
/**

View file

@ -94,7 +94,7 @@ function expectBranchingObjectNode(result: LearningPathResponse, persTestData: {
studentA: Student;
studentB: Student
}): LearningObjectNode {
let branchingObjectMatches = result.data![0].nodes.filter(
const branchingObjectMatches = result.data![0].nodes.filter(
it => it.learningobject_hruid === persTestData.learningContent.branchingObject.hruid
);
expect(branchingObjectMatches.length).toBe(1);
@ -156,7 +156,7 @@ describe('DatabaseLearningPathProvider', () => {
.transitions
.filter(it => it.next.hruid === persTestData.learningContent.finalObject.hruid)
.length
).toBe(0); // studentA picked the first option, therefore, there should be no direct path to the final object.
).toBe(0); // StudentA picked the first option, therefore, there should be no direct path to the final object.
expect(
branchingObject
.transitions
@ -183,7 +183,7 @@ describe('DatabaseLearningPathProvider', () => {
.transitions
.filter(it => it.next.hruid === persTestData.learningContent.finalObject.hruid)
.length
).toBe(1); // studentB picked the second option, therefore, there should be a direct path to the final object.
).toBe(1); // StudentB picked the second option, therefore, there should be a direct path to the final object.
expect(
branchingObject
.transitions

View file

@ -80,7 +80,5 @@ export function createConditionTestLearningPathAndLearningObjects(){
}
const example: LearningPathExample = {
createLearningPath: () => {
return createConditionTestLearningPathAndLearningObjects().learningPath;
},
createLearningPath: () => createConditionTestLearningPathAndLearningObjects().learningPath,
};