Merge pull request #121 from SELab-2/fix/tests-werken-niet-op-dev
fix: Tests falen op `dev`
This commit is contained in:
		
						commit
						9029d93e30
					
				
					 4 changed files with 11 additions and 5 deletions
				
			
		|  | @ -60,7 +60,8 @@ describe('DatabaseLearningObjectProvider', () => { | |||
|     describe('getLearningObjectHTML', () => { | ||||
|         it('should return the correct rendering of the learning object', async () => { | ||||
|             const result = await databaseLearningObjectProvider.getLearningObjectHTML(exampleLearningObject); | ||||
|             expect(result).toEqual(example.getHTMLRendering()); | ||||
|             // Set newlines so your tests are platform-independent.
 | ||||
|             expect(result).toEqual(example.getHTMLRendering().replace(/\r\n/g, '\n')); | ||||
|         }); | ||||
|         it('should return null for a non-existing learning object', async () => { | ||||
|             const result = await databaseLearningObjectProvider.getLearningObjectHTML({ | ||||
|  |  | |||
|  | @ -68,7 +68,8 @@ describe('LearningObjectService', () => { | |||
|         it('returns the expected HTML when queried with the identifier of a learning object saved in the database', async () => { | ||||
|             const result = await learningObjectService.getLearningObjectHTML(exampleLearningObject); | ||||
|             expect(result).not.toBeNull(); | ||||
|             expect(result).toEqual(learningObjectExample.getHTMLRendering()); | ||||
|             // Set newlines so your tests are platform-independent.
 | ||||
|             expect(result).toEqual(learningObjectExample.getHTMLRendering().replace(/\r\n/g, '\n')); | ||||
|         }); | ||||
|         it( | ||||
|             'returns the same HTML as the Dwengo API when queried with the identifier of a learning object that does ' + | ||||
|  |  | |||
|  | @ -8,18 +8,19 @@ describe('ProcessingService', () => { | |||
|     it('renders a markdown learning object correctly', async () => { | ||||
|         const markdownLearningObject = mdExample.createLearningObject(); | ||||
|         const result = await processingService.render(markdownLearningObject); | ||||
|         expect(result).toEqual(mdExample.getHTMLRendering()); | ||||
|         // Set newlines so your tests are platform-independent.
 | ||||
|         expect(result).toEqual(mdExample.getHTMLRendering().replace(/\r\n/g, '\n')); | ||||
|     }); | ||||
| 
 | ||||
|     it('renders a multiple choice question correctly', async () => { | ||||
|         const multipleChoiceLearningObject = multipleChoiceExample.createLearningObject(); | ||||
|         const result = await processingService.render(multipleChoiceLearningObject); | ||||
|         expect(result).toEqual(multipleChoiceExample.getHTMLRendering()); | ||||
|         expect(result).toEqual(multipleChoiceExample.getHTMLRendering().replace(/\r\n/g, '\n')); | ||||
|     }); | ||||
| 
 | ||||
|     it('renders an essay question correctly', async () => { | ||||
|         const essayLearningObject = essayExample.createLearningObject(); | ||||
|         const result = await processingService.render(essayLearningObject); | ||||
|         expect(result).toEqual(essayExample.getHTMLRendering()); | ||||
|         expect(result).toEqual(essayExample.getHTMLRendering().replace(/\r\n/g, '\n')); | ||||
|     }); | ||||
| }); | ||||
|  |  | |||
		Reference in a new issue
	
	 Laure Jablonski
						Laure Jablonski