style: fix linting issues met Prettier
This commit is contained in:
parent
8e2643f596
commit
d88add8351
9 changed files with 48 additions and 52 deletions
|
@ -5,11 +5,11 @@ import {
|
|||
createInvitationHandler,
|
||||
deleteInvitationHandler,
|
||||
getAllInvitationsHandler,
|
||||
getInvitationHandler
|
||||
getInvitationHandler,
|
||||
} from '../../src/controllers/teacher-invitations';
|
||||
import { TeacherInvitationData } from '@dwengo-1/common/interfaces/teacher-invitation';
|
||||
import { getClassHandler } from '../../src/controllers/classes';
|
||||
import {BadRequestException} from "../../src/exceptions/bad-request-exception";
|
||||
import { BadRequestException } from '../../src/exceptions/bad-request-exception';
|
||||
|
||||
describe('Teacher controllers', () => {
|
||||
let req: Partial<Request>;
|
||||
|
@ -91,8 +91,7 @@ describe('Teacher controllers', () => {
|
|||
params: { no: 'no params' },
|
||||
};
|
||||
|
||||
await expect( async () => getInvitationHandler(req as Request, res as Response))
|
||||
.rejects.toThrowError(BadRequestException);
|
||||
await expect(async () => getInvitationHandler(req as Request, res as Response)).rejects.toThrowError(BadRequestException);
|
||||
});
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
import {EntityManager} from '@mikro-orm/core';
|
||||
import {TeacherInvitation} from '../../../src/entities/classes/teacher-invitation.entity';
|
||||
import {Teacher} from '../../../src/entities/users/teacher.entity';
|
||||
import {Class} from '../../../src/entities/classes/class.entity';
|
||||
import {ClassStatus} from "@dwengo-1/common/util/class-join-request";
|
||||
import { EntityManager } from '@mikro-orm/core';
|
||||
import { TeacherInvitation } from '../../../src/entities/classes/teacher-invitation.entity';
|
||||
import { Teacher } from '../../../src/entities/users/teacher.entity';
|
||||
import { Class } from '../../../src/entities/classes/class.entity';
|
||||
import { ClassStatus } from '@dwengo-1/common/util/class-join-request';
|
||||
|
||||
export function makeTestTeacherInvitations(em: EntityManager, teachers: Teacher[], classes: Class[]): TeacherInvitation[] {
|
||||
const teacherInvitation01 = em.create(TeacherInvitation, {
|
||||
sender: teachers[1],
|
||||
receiver: teachers[0],
|
||||
class: classes[1],
|
||||
status: ClassStatus.Open
|
||||
status: ClassStatus.Open,
|
||||
});
|
||||
|
||||
const teacherInvitation02 = em.create(TeacherInvitation, {
|
||||
sender: teachers[1],
|
||||
receiver: teachers[2],
|
||||
class: classes[1],
|
||||
status: ClassStatus.Open
|
||||
status: ClassStatus.Open,
|
||||
});
|
||||
|
||||
const teacherInvitation03 = em.create(TeacherInvitation, {
|
||||
sender: teachers[2],
|
||||
receiver: teachers[0],
|
||||
class: classes[2],
|
||||
status: ClassStatus.Open
|
||||
status: ClassStatus.Open,
|
||||
});
|
||||
|
||||
const teacherInvitation04 = em.create(TeacherInvitation, {
|
||||
sender: teachers[0],
|
||||
receiver: teachers[1],
|
||||
class: classes[0],
|
||||
status: ClassStatus.Open
|
||||
status: ClassStatus.Open,
|
||||
});
|
||||
|
||||
return [teacherInvitation01, teacherInvitation02, teacherInvitation03, teacherInvitation04];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue