style: fix linting issues met Prettier
This commit is contained in:
		
							parent
							
								
									1b18338c78
								
							
						
					
					
						commit
						ba617a43e7
					
				
					 11 changed files with 46 additions and 30 deletions
				
			
		|  | @ -17,7 +17,7 @@ export async function initORM(testingMode = false): Promise<MikroORM<IDatabaseDr | |||
| 
 | ||||
|     // Update the database scheme if necessary and enabled.
 | ||||
|     if (getEnvVar(envVars.DbUpdate)) { | ||||
|         logger.info("MikroORM: Updating database schema"); | ||||
|         logger.info('MikroORM: Updating database schema'); | ||||
|         await orm.schema.updateSchema(); | ||||
|     } else { | ||||
|         const diff = await orm.schema.getUpdateSchemaSQL(); | ||||
|  |  | |||
|  | @ -29,7 +29,11 @@ describe('SubmissionRepository', () => { | |||
| 
 | ||||
|     it('should find the requested submission', async () => { | ||||
|         const usedSubmission = getSubmission01(); | ||||
|         const id = new LearningObjectIdentifier(usedSubmission.learningObjectHruid, usedSubmission.learningObjectLanguage, usedSubmission.learningObjectVersion); | ||||
|         const id = new LearningObjectIdentifier( | ||||
|             usedSubmission.learningObjectHruid, | ||||
|             usedSubmission.learningObjectLanguage, | ||||
|             usedSubmission.learningObjectVersion | ||||
|         ); | ||||
|         const submission = await submissionRepository.findSubmissionByLearningObjectAndSubmissionNumber(id, usedSubmission.submissionNumber!); | ||||
| 
 | ||||
|         expect(submission).toBeTruthy(); | ||||
|  | @ -40,7 +44,11 @@ describe('SubmissionRepository', () => { | |||
| 
 | ||||
|     it('should find the most recent submission for a student', async () => { | ||||
|         const usedSubmission = getSubmission02(); | ||||
|         const id = new LearningObjectIdentifier(usedSubmission.learningObjectHruid, usedSubmission.learningObjectLanguage, usedSubmission.learningObjectVersion); | ||||
|         const id = new LearningObjectIdentifier( | ||||
|             usedSubmission.learningObjectHruid, | ||||
|             usedSubmission.learningObjectLanguage, | ||||
|             usedSubmission.learningObjectVersion | ||||
|         ); | ||||
| 
 | ||||
|         const submission = await submissionRepository.findMostRecentSubmissionForStudent(id, usedSubmission.submitter); | ||||
| 
 | ||||
|  | @ -50,7 +58,11 @@ describe('SubmissionRepository', () => { | |||
| 
 | ||||
|     it('should find the most recent submission for a group', async () => { | ||||
|         const usedSubmission = getSubmission02(); | ||||
|         const id = new LearningObjectIdentifier(usedSubmission.learningObjectHruid, usedSubmission.learningObjectLanguage, usedSubmission.learningObjectVersion); | ||||
|         const id = new LearningObjectIdentifier( | ||||
|             usedSubmission.learningObjectHruid, | ||||
|             usedSubmission.learningObjectLanguage, | ||||
|             usedSubmission.learningObjectVersion | ||||
|         ); | ||||
| 
 | ||||
|         const submission = await submissionRepository.findMostRecentSubmissionForGroup(id, usedSubmission.onBehalfOf); | ||||
| 
 | ||||
|  |  | |||
|  | @ -48,7 +48,6 @@ describe('ClassRepository', () => { | |||
|         expect(invitations).toHaveLength(2); | ||||
|         expect(invitations[0].class.classId).toBeOneOf([ti1.class.classId, ti2.class.classId]); | ||||
|         expect(invitations[1].class.classId).toBeOneOf([ti1.class.classId, ti2.class.classId]); | ||||
| 
 | ||||
|     }); | ||||
| 
 | ||||
|     it('should not find a removed invitation', async () => { | ||||
|  |  | |||
|  | @ -49,8 +49,6 @@ describe('LearningObjectRepository', () => { | |||
|     }); | ||||
| 
 | ||||
|     it('should return the newest version of the learning object when queried by only hruid and language', async () => { | ||||
|          | ||||
| 
 | ||||
|         const result = await learningObjectRepository.findLatestByHruidAndLanguage(newerExample.hruid, newerExample.language); | ||||
|         // Expect(result).toBeInstanceOf(LearningObject);
 | ||||
|         // Expect(result?.version).toBe(10);
 | ||||
|  |  | |||
|  | @ -1,7 +1,12 @@ | |||
| import { EntityManager } from '@mikro-orm/core'; | ||||
| import { Question } from '../../../src/entities/questions/question.entity'; | ||||
| import { getDireStraits, getNoordkaap, getTestleerling1, getTool } from '../users/students.testdata'; | ||||
| import { testLearningObject01, testLearningObject04, testLearningObject05, testLearningObjectMultipleChoice } from '../content/learning-objects.testdata'; | ||||
| import { | ||||
|     testLearningObject01, | ||||
|     testLearningObject04, | ||||
|     testLearningObject05, | ||||
|     testLearningObjectMultipleChoice, | ||||
| } from '../content/learning-objects.testdata'; | ||||
| import { getGroup1ConditionalLearningPath, getTestGroup01, getTestGroup02 } from '../assignments/groups.testdata'; | ||||
| 
 | ||||
| export function makeTestQuestions(em: EntityManager): Question[] { | ||||
|  | @ -130,7 +135,6 @@ export function getQuestion06(): Question { | |||
|     return question06; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| export function getQuestion07(): Question { | ||||
|     return question07; | ||||
| } | ||||
|  |  | |||
|  | @ -5,7 +5,10 @@ import { seedORM } from './seedORM.js'; | |||
| 
 | ||||
| const logger: Logger = getLogger(); | ||||
| 
 | ||||
| export async function seedDatabase(envFile = '.env.development.local', testMode = process.env.NODE_ENV !== undefined && process.env.NODE_ENV === 'test'): Promise<void> { | ||||
| export async function seedDatabase( | ||||
|     envFile = '.env.development.local', | ||||
|     testMode = process.env.NODE_ENV !== undefined && process.env.NODE_ENV === 'test' | ||||
| ): Promise<void> { | ||||
|     dotenv.config({ path: envFile }); | ||||
| 
 | ||||
|     try { | ||||
|  |  | |||
		Reference in a new issue
	
	 Lint Action
						Lint Action