diff --git a/apps/server/src/attendance/attendance-workflow.integration.spec.ts b/apps/server/src/attendance/attendance-workflow.integration.spec.ts index 2fd4716..6c301f2 100644 --- a/apps/server/src/attendance/attendance-workflow.integration.spec.ts +++ b/apps/server/src/attendance/attendance-workflow.integration.spec.ts @@ -103,11 +103,6 @@ describe('attendance workflow integration', () => { }); it('imports students, builds a teacher class schedule, refreshes punches, and scopes reads', async () => { - let classId: number; - let scheduleId: number; - let studentA: Student; - let studentB: Student; - const roleRepo = app.get>(getRepositoryToken(Role)); const userRepo = app.get>(getRepositoryToken(User)); const studentRepo = app.get>(getRepositoryToken(Student)); @@ -168,7 +163,7 @@ describe('attendance workflow integration', () => { .expect(201); expect(importResult.body).toMatchObject({ imported: 2, skipped: 0 }); - [studentA, studentB] = await Promise.all([ + const [studentA, studentB] = await Promise.all([ studentRepo.findOneByOrFail({ phone: '13800000001' }), studentRepo.findOneByOrFail({ phone: '13800000002' }), ]); @@ -189,7 +184,7 @@ describe('attendance workflow integration', () => { endDate: LESSON_DATE, }) .expect(201); - classId = classResult.body.id; + const classId = classResult.body.id; await request(app.getHttpServer()) .post(`/api/classes/${classId}/students`) @@ -227,7 +222,7 @@ describe('attendance workflow integration', () => { scheduleType: 'INTERNAL', }) .expect(201); - scheduleId = scheduleResult.body.id; + const scheduleId = scheduleResult.body.id; const initialPull = await request(app.getHttpServer()) .post(`/api/attendance-lessons/schedules/${scheduleId}/pull`)