fix: Test- en linting-errors opgelost
This commit is contained in:
		
							parent
							
								
									ce5c0ea629
								
							
						
					
					
						commit
						ba912c3ef0
					
				
					 20 changed files with 103 additions and 116 deletions
				
			
		|  | @ -41,7 +41,7 @@ describe('LearningObjectRepository', () => { | |||
|     let newerExample: LearningObject; | ||||
| 
 | ||||
|     it('should allow a learning object with the same id except a different version to be added', async () => { | ||||
|         let testLearningObject01Newer = structuredClone(testLearningObject01); | ||||
|         const testLearningObject01Newer = structuredClone(testLearningObject01); | ||||
|         testLearningObject01Newer.version = 10; | ||||
|         testLearningObject01Newer.title += " (nieuw)"; | ||||
|         testLearningObject01Newer.uuid = v4(); | ||||
|  |  | |||
|  | @ -3,6 +3,7 @@ import { getLearningPathRepository } from '../../../src/data/repositories'; | |||
| import { LearningPathRepository } from '../../../src/data/content/learning-path-repository'; | ||||
| import { setupTestApp } from '../../setup-tests'; | ||||
| import { Language } from '@dwengo-1/common/util/language'; | ||||
| import {testLearningPath01} from "../../test_assets/content/learning-paths.testdata"; | ||||
| 
 | ||||
| describe('LearningPathRepository', () => { | ||||
|     let learningPathRepository: LearningPathRepository; | ||||
|  | @ -19,10 +20,12 @@ describe('LearningPathRepository', () => { | |||
|     }); | ||||
| 
 | ||||
|     it('should return requested learning path', async () => { | ||||
|         const learningPath = await learningPathRepository.findByHruidAndLanguage('id01', Language.English); | ||||
|         const learningPath = await learningPathRepository.findByHruidAndLanguage( | ||||
|             testLearningPath01.hruid, testLearningPath01.language as Language | ||||
|         ); | ||||
| 
 | ||||
|         expect(learningPath).toBeTruthy(); | ||||
|         expect(learningPath?.title).toBe('repertoire Tool'); | ||||
|         expect(learningPath?.description).toBe('all about Tool'); | ||||
|         expect(learningPath?.title).toBe(testLearningPath01.title); | ||||
|         expect(learningPath?.description).toBe(testLearningPath01.description); | ||||
|     }); | ||||
| }); | ||||
|  |  | |||
		Reference in a new issue
	
	 Gerald Schmittinger
						Gerald Schmittinger