fix: Test- en linting-errors opgelost
This commit is contained in:
		
							parent
							
								
									ce5c0ea629
								
							
						
					
					
						commit
						ba912c3ef0
					
				
					 20 changed files with 103 additions and 116 deletions
				
			
		|  | @ -33,9 +33,10 @@ describe('AssignmentRepository', () => { | |||
| 
 | ||||
|     it('should find all by username of the responsible teacher', async () => { | ||||
|         const result = await assignmentRepository.findAllByResponsibleTeacher('testleerkracht1'); | ||||
|         const resultIds = result.map((it) => it.id).sort((a, b) => (a ?? 0) - (b ?? 0)); | ||||
|         const resultIds = result.map((it) => it.id) | ||||
|             .sort((a, b) => (a ?? 0) - (b ?? 0)); | ||||
| 
 | ||||
|         expect(resultIds).toEqual([1, 3, 4]); | ||||
|         expect(resultIds).toEqual([1, 1, 3, 4]); | ||||
|     }); | ||||
| 
 | ||||
|     it('should not find removed assignment', async () => { | ||||
|  |  | |||
|  | @ -91,9 +91,11 @@ describe('SubmissionRepository', () => { | |||
|         expect(result[2].submissionNumber).toBe(3); | ||||
|     }); | ||||
| 
 | ||||
|     it("should find only the submissions for a certain learning object and assignment made for the user's group", async () => { | ||||
|         const result = await submissionRepository.findAllSubmissionsForLearningObjectAndAssignment(loId, assignment!, 'Tool'); | ||||
|         // (student Tool is in group #2)
 | ||||
|     it("should find only the submissions for a certain learning object and assignment made for the given group", async () => { | ||||
|         const group = await groupRepository.findByAssignmentAndGroupNumber(assignment!, 2); | ||||
|         const result = await submissionRepository.findAllSubmissionsForLearningObjectAndGroup( | ||||
|             loId, group! | ||||
|         ); | ||||
| 
 | ||||
|         expect(result).toHaveLength(1); | ||||
| 
 | ||||
|  |  | |||
		Reference in a new issue
	
	 Gerald Schmittinger
						Gerald Schmittinger