style: fix linting issues met Prettier

This commit is contained in:
Lint Action 2025-03-01 10:33:30 +00:00
parent 74765577d5
commit 17893a6990
53 changed files with 1350 additions and 1314 deletions

View file

@ -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,23 @@ describe("StudentRepository", () => {
studentRepository = getStudentRepository();
});
it("should return the queried student after he was added", async () => {
await studentRepository.insert(new Student(username, firstName, lastName));
it('should return the queried student after he was added', async () => {
await studentRepository.insert(
new Student(username, firstName, lastName)
);
const 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);
const retrievedStudent = await studentRepository.findByUsername(username);
const retrievedStudent =
await studentRepository.findByUsername(username);
expect(retrievedStudent).toBeNull();
});
});