style: format en linting
This commit is contained in:
		
							parent
							
								
									4cb1469479
								
							
						
					
					
						commit
						e2bf413f35
					
				
					 22 changed files with 41 additions and 71 deletions
				
			
		|  | @ -1,15 +1,10 @@ | |||
| import { beforeAll, describe, expect, it } from 'vitest'; | ||||
| import { setupTestApp } from '../../setup-tests'; | ||||
| import { AnswerRepository } from '../../../src/data/questions/answer-repository'; | ||||
| import { getAnswerRepository, getQuestionRepository, getTeacherRepository } from '../../../src/data/repositories'; | ||||
| import { QuestionRepository } from '../../../src/data/questions/question-repository'; | ||||
| import { LearningObjectIdentifier } from '../../../src/entities/content/learning-object-identifier'; | ||||
| import { Language } from '@dwengo-1/common/util/language'; | ||||
| import { TeacherRepository } from '../../../src/data/users/teacher-repository'; | ||||
| import { getQuestion01, getQuestion02, getQuestion04, getQuestion05, getQuestion06 } from '../../test_assets/questions/questions.testdata'; | ||||
| import { getAnswerRepository } from '../../../src/data/repositories'; | ||||
| import { getQuestion01, getQuestion02 } from '../../test_assets/questions/questions.testdata'; | ||||
| import { getAnswer01, getAnswer02, getAnswer03 } from '../../test_assets/questions/answers.testdata'; | ||||
| import { getFooFighters } from '../../test_assets/users/teachers.testdata'; | ||||
| import { testLearningObject05 } from '../../test_assets/content/learning-objects.testdata'; | ||||
| 
 | ||||
| describe('AnswerRepository', () => { | ||||
|     let answerRepository: AnswerRepository; | ||||
|  | @ -24,7 +19,7 @@ describe('AnswerRepository', () => { | |||
|         const a1 = getAnswer01(); | ||||
|         const a2 = getAnswer02(); | ||||
| 
 | ||||
|         const answers = await answerRepository.findAllAnswersToQuestion(question!); | ||||
|         const answers = await answerRepository.findAllAnswersToQuestion(question); | ||||
| 
 | ||||
|         expect(answers).toBeTruthy(); | ||||
|         expect(answers).toHaveLength(2); | ||||
|  | @ -38,7 +33,7 @@ describe('AnswerRepository', () => { | |||
| 
 | ||||
|         await answerRepository.createAnswer({ | ||||
|             toQuestion: question, | ||||
|             author: teacher!, | ||||
|             author: teacher, | ||||
|             content: 'created answer', | ||||
|         }); | ||||
| 
 | ||||
|  |  | |||
|  | @ -48,8 +48,8 @@ describe('QuestionRepository', () => { | |||
|         const group = getTestGroup01(); | ||||
|         await questionRepository.createQuestion({ | ||||
|             loId: id, | ||||
|             inGroup: group!, | ||||
|             author: student!, | ||||
|             inGroup: group, | ||||
|             author: student, | ||||
|             content: 'question?', | ||||
|         }); | ||||
|         const question = await questionRepository.findAllQuestionsAboutLearningObject(id); | ||||
|  | @ -66,7 +66,7 @@ describe('QuestionRepository', () => { | |||
|             language: testLearningObject05.language, | ||||
|             version: testLearningObject05.version, | ||||
|         }; | ||||
|         const result = await questionRepository.findAllQuestionsAboutLearningObjectInAssignment(loId, assignment!); | ||||
|         const result = await questionRepository.findAllQuestionsAboutLearningObjectInAssignment(loId, assignment); | ||||
|         sortQuestions(result); | ||||
| 
 | ||||
|         expect(result).toHaveLength(3); | ||||
|  | @ -94,7 +94,7 @@ describe('QuestionRepository', () => { | |||
|         }; | ||||
|         const assignment = getAssignment01(); | ||||
| 
 | ||||
|         const result = await questionRepository.findAllQuestionsAboutLearningObjectInAssignment(loId, assignment!, getTool().username); | ||||
|         const result = await questionRepository.findAllQuestionsAboutLearningObjectInAssignment(loId, assignment, getTool().username); | ||||
|         // (student Tool is in group #2)
 | ||||
| 
 | ||||
|         expect(result).toHaveLength(1); | ||||
|  |  | |||
		Reference in a new issue
	
	 laurejablonski
						laurejablonski