From 22522fc384d1be29ba7b2b606d4d674dbfc58726 Mon Sep 17 00:00:00 2001 From: white Date: Sun, 19 May 2024 22:43:10 +0200 Subject: [PATCH] debug: test 8 --- api/src/timeslots/timeslots.e2e-spec.ts | 6 ++---- api/src/timeslots/timeslots.service.ts | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/api/src/timeslots/timeslots.e2e-spec.ts b/api/src/timeslots/timeslots.e2e-spec.ts index fc8f76a..b175296 100644 --- a/api/src/timeslots/timeslots.e2e-spec.ts +++ b/api/src/timeslots/timeslots.e2e-spec.ts @@ -959,11 +959,9 @@ describe('TimeslotsController', () => { .expect(200) .expect((res) => { expect(res.body).toBeInstanceOf(Array); + expect(res.body).toHaveLength(2); + expect(res.body).toEqual(expected); }); - - const availableTimeSlots = - await timeSlotsService.findAvailableTimeSlots(); - expect(availableTimeSlots).toEqual(expected); }); }); }); diff --git a/api/src/timeslots/timeslots.service.ts b/api/src/timeslots/timeslots.service.ts index 98ad638..852ebd3 100644 --- a/api/src/timeslots/timeslots.service.ts +++ b/api/src/timeslots/timeslots.service.ts @@ -9,6 +9,7 @@ import { Role, } from '@hkrecruitment/shared'; import { CreateTimeSlotDto } from './create-timeslot.dto'; +import { count } from 'console'; @Injectable() export class TimeSlotsService { @@ -201,8 +202,6 @@ export class TimeSlotsService { }, }); - return allMatches; - let goodTimeSlots: TimeSlot[] = []; allMatches.forEach((timeSlot) => { let boardMembers = 0;