style: fix linting issues met Prettier
This commit is contained in:
parent
e58835aa17
commit
e73d5c21c3
34 changed files with 103 additions and 296 deletions
|
@ -1,11 +1,7 @@
|
|||
import { beforeAll, describe, expect, it } from 'vitest';
|
||||
import { setupTestApp } from '../../setup-tests';
|
||||
import { ClassJoinRequestRepository } from '../../../src/data/classes/class-join-request-repository';
|
||||
import {
|
||||
getClassJoinRequestRepository,
|
||||
getClassRepository,
|
||||
getStudentRepository,
|
||||
} from '../../../src/data/repositories';
|
||||
import { getClassJoinRequestRepository, getClassRepository, getStudentRepository } from '../../../src/data/repositories';
|
||||
import { StudentRepository } from '../../../src/data/users/student-repository';
|
||||
import { Class } from '../../../src/entities/classes/class.entity';
|
||||
import { ClassRepository } from '../../../src/data/classes/class-repository';
|
||||
|
@ -25,9 +21,7 @@ describe('ClassJoinRequestRepository', () => {
|
|||
|
||||
it('should list all requests from student to join classes', async () => {
|
||||
const student = await studentRepository.findByUsername('PinkFloyd');
|
||||
const requests = await classJoinRequestRepository.findAllRequestsBy(
|
||||
student!
|
||||
);
|
||||
const requests = await classJoinRequestRepository.findAllRequestsBy(student!);
|
||||
|
||||
expect(requests).toBeTruthy();
|
||||
expect(requests).toHaveLength(2);
|
||||
|
@ -35,23 +29,18 @@ describe('ClassJoinRequestRepository', () => {
|
|||
|
||||
it('should list all requests to a single class', async () => {
|
||||
const class_ = await cassRepository.findById('id02');
|
||||
const requests = await classJoinRequestRepository.findAllOpenRequestsTo(
|
||||
class_!
|
||||
);
|
||||
const requests = await classJoinRequestRepository.findAllOpenRequestsTo(class_!);
|
||||
|
||||
expect(requests).toBeTruthy();
|
||||
expect(requests).toHaveLength(2);
|
||||
});
|
||||
|
||||
it('should not find a removed request', async () => {
|
||||
const student =
|
||||
await studentRepository.findByUsername('SmashingPumpkins');
|
||||
const student = await studentRepository.findByUsername('SmashingPumpkins');
|
||||
const class_ = await cassRepository.findById('id03');
|
||||
await classJoinRequestRepository.deleteBy(student!, class_!);
|
||||
|
||||
const request = await classJoinRequestRepository.findAllRequestsBy(
|
||||
student!
|
||||
);
|
||||
const request = await classJoinRequestRepository.findAllRequestsBy(student!);
|
||||
|
||||
expect(request).toHaveLength(0);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue