Merge branch 'dev' into refactor/common
This commit is contained in:
		
						commit
						a4408b5bc0
					
				
					 145 changed files with 3437 additions and 2822 deletions
				
			
		|  | @ -23,9 +23,9 @@ describe('AnswerRepository', () => { | |||
|         const id = new LearningObjectIdentifier('id05', Language.English, 1); | ||||
|         const questions = await questionRepository.findAllQuestionsAboutLearningObject(id); | ||||
| 
 | ||||
|         const question = questions.filter((it) => it.sequenceNumber == 2)[0]; | ||||
|         const question = questions.find((it) => it.sequenceNumber === 2); | ||||
| 
 | ||||
|         const answers = await answerRepository.findAllAnswersToQuestion(question); | ||||
|         const answers = await answerRepository.findAllAnswersToQuestion(question!); | ||||
| 
 | ||||
|         expect(answers).toBeTruthy(); | ||||
|         expect(answers).toHaveLength(2); | ||||
|  |  | |||
|  | @ -2,21 +2,18 @@ import { beforeAll, describe, expect, it } from 'vitest'; | |||
| import { Language } from 'dwengo-1-common/src/util/language'; | ||||
| import { setupTestApp } from '../../setup-tests'; | ||||
| import { QuestionRepository } from '../../../src/data/questions/question-repository'; | ||||
| import { getLearningObjectRepository, getQuestionRepository, getStudentRepository } from '../../../src/data/repositories'; | ||||
| import { getQuestionRepository, getStudentRepository } from '../../../src/data/repositories'; | ||||
| import { StudentRepository } from '../../../src/data/users/student-repository'; | ||||
| import { LearningObjectRepository } from '../../../src/data/content/learning-object-repository'; | ||||
| import { LearningObjectIdentifier } from '../../../src/entities/content/learning-object-identifier'; | ||||
| 
 | ||||
| describe('QuestionRepository', () => { | ||||
|     let questionRepository: QuestionRepository; | ||||
|     let studentRepository: StudentRepository; | ||||
|     let learningObjectRepository: LearningObjectRepository; | ||||
| 
 | ||||
|     beforeAll(async () => { | ||||
|         await setupTestApp(); | ||||
|         questionRepository = getQuestionRepository(); | ||||
|         studentRepository = getStudentRepository(); | ||||
|         learningObjectRepository = getLearningObjectRepository(); | ||||
|     }); | ||||
| 
 | ||||
|     it('should return all questions part of the given learning object', async () => { | ||||
|  |  | |||
		Reference in a new issue