style: fix linting issues met ESLint

This commit is contained in:
Lint Action 2025-05-13 07:48:17 +00:00
parent 47e47323d3
commit 1b18338c78
15 changed files with 34 additions and 34 deletions

View file

@ -17,7 +17,7 @@ describe('AssignmentRepository', () => {
it('should return the requested assignment', async () => {
const class_ = getClass02();
const usedAssignment = getAssignment02();
const assignment = await assignmentRepository.findByClassAndId(class_!, 21001);
const assignment = await assignmentRepository.findByClassAndId(class_, 21001);
expect(assignment).toBeTruthy();
expect(assignment!.description).toBe(usedAssignment.description);
@ -30,7 +30,7 @@ describe('AssignmentRepository', () => {
it('should return all assignments for a class', async () => {
const class_ = getClass02();
const usedAssignment = getAssignment02();
const assignments = await assignmentRepository.findAllAssignmentsInClass(class_!);
const assignments = await assignmentRepository.findAllAssignmentsInClass(class_);
expect(assignments).toBeTruthy();
expect(assignments).toHaveLength(1);

View file

@ -21,7 +21,7 @@ describe('GroupRepository', () => {
const member1 = getNoordkaap();
const member2 = getDireStraits();
const group = await groupRepository.findByAssignmentAndGroupNumber(assignment!, usedGroup.groupNumber!);
const group = await groupRepository.findByAssignmentAndGroupNumber(assignment, usedGroup.groupNumber!);
expect(group).toBeTruthy();
expect(group?.groupNumber).toBe(usedGroup.groupNumber);
@ -36,7 +36,7 @@ describe('GroupRepository', () => {
const gr2 = getTestGroup02();
const gr3 = getTestGroup03();
const groups = await groupRepository.findAllGroupsForAssignment(assignment!);
const groups = await groupRepository.findAllGroupsForAssignment(assignment);
expect(groups).toBeTruthy();
expect(groups).toHaveLength(3);
@ -49,9 +49,9 @@ describe('GroupRepository', () => {
const assignment = getAssignment02();
const deleted = getTestGroup01();
await groupRepository.deleteByAssignmentAndGroupNumber(assignment!, deleted.groupNumber!);
await groupRepository.deleteByAssignmentAndGroupNumber(assignment, deleted.groupNumber!);
const group = await groupRepository.findByAssignmentAndGroupNumber(assignment!, deleted.groupNumber!);
const group = await groupRepository.findByAssignmentAndGroupNumber(assignment, deleted.groupNumber!);
expect(group).toBeNull();
});

View file

@ -42,7 +42,7 @@ describe('SubmissionRepository', () => {
const usedSubmission = getSubmission02();
const id = new LearningObjectIdentifier(usedSubmission.learningObjectHruid, usedSubmission.learningObjectLanguage, usedSubmission.learningObjectVersion);
const submission = await submissionRepository.findMostRecentSubmissionForStudent(id, usedSubmission.submitter!);
const submission = await submissionRepository.findMostRecentSubmissionForStudent(id, usedSubmission.submitter);
expect(submission).toBeTruthy();
expect(submission?.submissionTime).toStrictEqual(usedSubmission.submissionTime);
@ -67,7 +67,7 @@ describe('SubmissionRepository', () => {
language: usedSubmission.learningObjectLanguage,
version: usedSubmission.learningObjectVersion,
};
const result = await submissionRepository.findAllSubmissionsForLearningObjectAndAssignment(loId, assignment!);
const result = await submissionRepository.findAllSubmissionsForLearningObjectAndAssignment(loId, assignment);
sortSubmissions(result);
expect(result).toHaveLength(3);
@ -94,7 +94,7 @@ describe('SubmissionRepository', () => {
version: usedSubmission.learningObjectVersion,
};
const result = await submissionRepository.findAllSubmissionsForLearningObjectAndGroup(loId, group!);
const result = await submissionRepository.findAllSubmissionsForLearningObjectAndGroup(loId, group);
expect(result).toHaveLength(1);