Skip to content

Commit

Permalink
fix: 3
Browse files Browse the repository at this point in the history
  • Loading branch information
whiitex committed May 19, 2024
1 parent 3a8c0d2 commit 50533c5
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions api/src/timeslots/timeslots.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1191,30 +1191,30 @@ describe('TimeslotsController', () => {
describe(' GET /timeslots', () => {
beforeEach(async () => {
let promises = [];
mockRecruitmentSessions.forEach(async (rs) =>
mockRecruitmentSessions.forEach((rs) =>
promises.push(recruitmentSessionService.createRecruitmentSession(rs)),
);

await Promise.all(promises).then(() => {
promises = [];
mockUsers.forEach(async (u) => promises.push(usersService.create(u)));
await Promise.all(promises);

Promise.all(promises).then(() => {
promises = [];
mockTimeSlots.forEach(async (ts) =>
promises.push(timeSlotsService.createTimeSlot(ts)),
);
promises = [];
mockUsers.forEach((u) => promises.push(usersService.create(u)));

Promise.all(promises).then(() => {
promises = [];
mockAvailability.forEach(async (a) =>
promises.push(availabilityService.createAvailability(a)),
);
await Promise.all(promises);

Promise.all(promises);
});
});
});
promises = [];
mockTimeSlots.forEach((ts) =>
promises.push(timeSlotsService.createTimeSlot(ts)),
);

await Promise.all(promises);

promises = [];
mockAvailability.forEach((a) =>
promises.push(availabilityService.createAvailability(a)),
);

await Promise.all(promises);
});

it('should return all available timeslots', async () => {
Expand Down

0 comments on commit 50533c5

Please sign in to comment.