Merge remote-tracking branch 'origin/dev' into feature/own-learning-objects
# Conflicts: # backend/package.json # backend/src/config.ts # backend/src/controllers/learningObjects.ts # backend/src/controllers/learningPaths.ts # backend/src/data/content/attachment-repository.ts # backend/src/data/content/learning-object-repository.ts # backend/src/data/content/learning-path-repository.ts # backend/src/data/repositories.ts # backend/src/entities/content/learning-path.entity.ts # backend/src/exceptions.ts # backend/src/routes/learning-objects.ts # backend/src/services/learningObjects.ts # backend/src/services/learningPaths.ts # backend/src/util/apiHelper.ts # backend/src/util/envvars.ts # package-lock.json
This commit is contained in:
		
						commit
						cd0a3a8a7b
					
				
					 119 changed files with 8837 additions and 1697 deletions
				
			
		|  | @ -1,13 +1,13 @@ | |||
| import {setupTestApp} from "../setup-tests.js" | ||||
| import {Student} from "../../src/entities/users/student.entity.js"; | ||||
| import {describe, it, expect, beforeAll} from "vitest"; | ||||
| import {StudentRepository} from "../../src/data/users/student-repository.js"; | ||||
| import {getStudentRepository} from "../../src/data/repositories.js"; | ||||
| import { setupTestApp } from '../setup-tests.js'; | ||||
| import { Student } from '../../src/entities/users/student.entity.js'; | ||||
| import { describe, it, expect, beforeAll } from 'vitest'; | ||||
| import { StudentRepository } from '../../src/data/users/student-repository.js'; | ||||
| import { getStudentRepository } from '../../src/data/repositories.js'; | ||||
| 
 | ||||
| const username = "teststudent"; | ||||
| const firstName = "John"; | ||||
| const lastName = "Doe"; | ||||
| describe("StudentRepository", () => { | ||||
| const username = 'teststudent'; | ||||
| const firstName = 'John'; | ||||
| const lastName = 'Doe'; | ||||
| describe('StudentRepository', () => { | ||||
|     let studentRepository: StudentRepository; | ||||
| 
 | ||||
|     beforeAll(async () => { | ||||
|  | @ -15,19 +15,19 @@ describe("StudentRepository", () => { | |||
|         studentRepository = getStudentRepository(); | ||||
|     }); | ||||
| 
 | ||||
|     it("should return the queried student after he was added", async () => { | ||||
|     it('should return the queried student after he was added', async () => { | ||||
|         await studentRepository.insert(new Student(username, firstName, lastName)); | ||||
| 
 | ||||
|         let retrievedStudent = await studentRepository.findByUsername(username); | ||||
|         const retrievedStudent = await studentRepository.findByUsername(username); | ||||
|         expect(retrievedStudent).toBeTruthy(); | ||||
|         expect(retrievedStudent?.firstName).toBe(firstName); | ||||
|         expect(retrievedStudent?.lastName).toBe(lastName); | ||||
|     }); | ||||
| 
 | ||||
|     it("should no longer return the queried student after he was removed again", async () => { | ||||
|     it('should no longer return the queried student after he was removed again', async () => { | ||||
|         await studentRepository.deleteByUsername(username); | ||||
| 
 | ||||
|         let retrievedStudent = await studentRepository.findByUsername(username); | ||||
|         const retrievedStudent = await studentRepository.findByUsername(username); | ||||
|         expect(retrievedStudent).toBeNull(); | ||||
|     }); | ||||
| }); | ||||
|  |  | |||
		Reference in a new issue
	
	 Gerald Schmittinger
						Gerald Schmittinger