style: fix linting issues met Prettier
This commit is contained in:
		
							parent
							
								
									e58835aa17
								
							
						
					
					
						commit
						e73d5c21c3
					
				
					 34 changed files with 103 additions and 296 deletions
				
			
		|  | @ -1,11 +1,7 @@ | |||
| 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 { 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 '../../../src/entities/content/language'; | ||||
|  | @ -25,13 +21,11 @@ describe('AnswerRepository', () => { | |||
| 
 | ||||
|     it('should find all answers to a question', async () => { | ||||
|         const id = new LearningObjectIdentifier('id05', Language.English, '1'); | ||||
|         const questions = | ||||
|             await questionRepository.findAllQuestionsAboutLearningObject(id); | ||||
|         const questions = await questionRepository.findAllQuestionsAboutLearningObject(id); | ||||
| 
 | ||||
|         const question = questions.filter((it) => it.sequenceNumber == 2)[0]; | ||||
| 
 | ||||
|         const answers = | ||||
|             await answerRepository.findAllAnswersToQuestion(question); | ||||
|         const answers = await answerRepository.findAllAnswersToQuestion(question); | ||||
| 
 | ||||
|         expect(answers).toBeTruthy(); | ||||
|         expect(answers).toHaveLength(2); | ||||
|  | @ -42,8 +36,7 @@ describe('AnswerRepository', () => { | |||
|     it('should create an answer to a question', async () => { | ||||
|         const teacher = await teacherRepository.findByUsername('FooFighters'); | ||||
|         const id = new LearningObjectIdentifier('id05', Language.English, '1'); | ||||
|         const questions = | ||||
|             await questionRepository.findAllQuestionsAboutLearningObject(id); | ||||
|         const questions = await questionRepository.findAllQuestionsAboutLearningObject(id); | ||||
| 
 | ||||
|         const question = questions[0]; | ||||
| 
 | ||||
|  | @ -53,8 +46,7 @@ describe('AnswerRepository', () => { | |||
|             content: 'created answer', | ||||
|         }); | ||||
| 
 | ||||
|         const answers = | ||||
|             await answerRepository.findAllAnswersToQuestion(question); | ||||
|         const answers = await answerRepository.findAllAnswersToQuestion(question); | ||||
| 
 | ||||
|         expect(answers).toBeTruthy(); | ||||
|         expect(answers).toHaveLength(1); | ||||
|  | @ -63,17 +55,11 @@ describe('AnswerRepository', () => { | |||
| 
 | ||||
|     it('should not find a removed answer', async () => { | ||||
|         const id = new LearningObjectIdentifier('id04', Language.English, '1'); | ||||
|         const questions = | ||||
|             await questionRepository.findAllQuestionsAboutLearningObject(id); | ||||
|         const questions = await questionRepository.findAllQuestionsAboutLearningObject(id); | ||||
| 
 | ||||
|         await answerRepository.removeAnswerByQuestionAndSequenceNumber( | ||||
|             questions[0], | ||||
|             1 | ||||
|         ); | ||||
|         await answerRepository.removeAnswerByQuestionAndSequenceNumber(questions[0], 1); | ||||
| 
 | ||||
|         const emptyList = await answerRepository.findAllAnswersToQuestion( | ||||
|             questions[0] | ||||
|         ); | ||||
|         const emptyList = await answerRepository.findAllAnswersToQuestion(questions[0]); | ||||
| 
 | ||||
|         expect(emptyList).toHaveLength(0); | ||||
|     }); | ||||
|  |  | |||
		Reference in a new issue
	
	 Lint Action
						Lint Action