style: fix linting issues met Prettier
This commit is contained in:
		
							parent
							
								
									b630b9a45d
								
							
						
					
					
						commit
						466b9b8d17
					
				
					 1 changed files with 22 additions and 22 deletions
				
			
		|  | @ -7,8 +7,8 @@ import learningObjectService from '../../../src/services/learning-objects/learni | |||
| import { LearningObjectIdentifier, LearningPathIdentifier } from '../../../src/interfaces/learning-content'; | ||||
| import { Language } from '../../../src/entities/content/language'; | ||||
| import { EnvVars, getEnvVar } from '../../../src/util/envvars'; | ||||
| import {LearningPath} from "../../../src/entities/content/learning-path.entity"; | ||||
| import learningPathExample from "../../test-assets/learning-paths/pn-werking-example"; | ||||
| import { LearningPath } from '../../../src/entities/content/learning-path.entity'; | ||||
| import learningPathExample from '../../test-assets/learning-paths/pn-werking-example'; | ||||
| 
 | ||||
| const TEST_LEARNING_OBJECT_TITLE = 'Test title'; | ||||
| const EXPECTED_DWENGO_LEARNING_OBJECT_TITLE = 'Werken met notebooks'; | ||||
|  | @ -20,9 +20,9 @@ const DWENGO_TEST_LEARNING_OBJECT_ID: LearningObjectIdentifier = { | |||
| 
 | ||||
| const DWENGO_TEST_LEARNING_PATH_ID: LearningPathIdentifier = { | ||||
|     hruid: 'pn_werking', | ||||
|     language: Language.Dutch | ||||
|     language: Language.Dutch, | ||||
| }; | ||||
| const DWENGO_TEST_LEARNING_PATH_HRUIDS = new Set(["pn_werkingnotebooks", "pn_werkingnotebooks2", "pn_werkingnotebooks3"]); | ||||
| const DWENGO_TEST_LEARNING_PATH_HRUIDS = new Set(['pn_werkingnotebooks', 'pn_werkingnotebooks2', 'pn_werkingnotebooks3']); | ||||
| 
 | ||||
| async function initExampleData(): Promise<{ learningObject: LearningObject; learningPath: LearningPath }> { | ||||
|     const learningObjectRepo = getLearningObjectRepository(); | ||||
|  | @ -95,31 +95,31 @@ describe('LearningObjectService', () => { | |||
|     }); | ||||
| 
 | ||||
|     describe('getLearningObjectsFromPath', () => { | ||||
|         it("returns all learning objects when a learning path in the database is queried", async () => { | ||||
|         it('returns all learning objects when a learning path in the database is queried', async () => { | ||||
|             const result = await learningObjectService.getLearningObjectsFromPath(exampleLearningPath); | ||||
|             expect(result.map(it => it.key)).toEqual(exampleLearningPath.nodes.map(it => it.learningObjectHruid)); | ||||
|             expect(result.map((it) => it.key)).toEqual(exampleLearningPath.nodes.map((it) => it.learningObjectHruid)); | ||||
|         }); | ||||
|         it("also returns all learning objects when a learning path from the Dwengo API is queried", async () => { | ||||
|         it('also returns all learning objects when a learning path from the Dwengo API is queried', async () => { | ||||
|             const result = await learningObjectService.getLearningObjectsFromPath(DWENGO_TEST_LEARNING_PATH_ID); | ||||
|             expect(new Set(result.map(it => it.key))).toEqual(DWENGO_TEST_LEARNING_PATH_HRUIDS); | ||||
|             expect(new Set(result.map((it) => it.key))).toEqual(DWENGO_TEST_LEARNING_PATH_HRUIDS); | ||||
|         }); | ||||
|         it("returns an empty list when queried with a non-existing learning path id", async () => { | ||||
|             const result = await learningObjectService.getLearningObjectsFromPath({hruid: "non_existing", language: Language.Dutch}); | ||||
|         it('returns an empty list when queried with a non-existing learning path id', async () => { | ||||
|             const result = await learningObjectService.getLearningObjectsFromPath({ hruid: 'non_existing', language: Language.Dutch }); | ||||
|             expect(result).toEqual([]); | ||||
|         }); | ||||
|     }); | ||||
| 
 | ||||
|     describe('getLearningObjectIdsFromPath', () => { | ||||
|         it("returns all learning objects when a learning path in the database is queried", async () => { | ||||
|         it('returns all learning objects when a learning path in the database is queried', async () => { | ||||
|             const result = await learningObjectService.getLearningObjectIdsFromPath(exampleLearningPath); | ||||
|             expect(result).toEqual(exampleLearningPath.nodes.map(it => it.learningObjectHruid)); | ||||
|             expect(result).toEqual(exampleLearningPath.nodes.map((it) => it.learningObjectHruid)); | ||||
|         }); | ||||
|         it("also returns all learning object hruids when a learning path from the Dwengo API is queried", async () => { | ||||
|         it('also returns all learning object hruids when a learning path from the Dwengo API is queried', async () => { | ||||
|             const result = await learningObjectService.getLearningObjectIdsFromPath(DWENGO_TEST_LEARNING_PATH_ID); | ||||
|             expect(new Set(result)).toEqual(DWENGO_TEST_LEARNING_PATH_HRUIDS); | ||||
|         }); | ||||
|         it("returns an empty list when queried with a non-existing learning path id", async () => { | ||||
|             const result = await learningObjectService.getLearningObjectIdsFromPath({hruid: "non_existing", language: Language.Dutch}); | ||||
|         it('returns an empty list when queried with a non-existing learning path id', async () => { | ||||
|             const result = await learningObjectService.getLearningObjectIdsFromPath({ hruid: 'non_existing', language: Language.Dutch }); | ||||
|             expect(result).toEqual([]); | ||||
|         }); | ||||
|     }); | ||||
|  |  | |||
		Reference in a new issue
	
	 Lint Action
						Lint Action