feat: improve attendance scheduling and API validation

This commit is contained in:
2026-07-14 23:12:14 +08:00
parent c75a08affe
commit e45da7f998
33 changed files with 869 additions and 297 deletions

View File

@@ -17,6 +17,7 @@ describe('ArchiveService.getProfile', () => {
const learningRecordRepo = { find: jest.fn().mockResolvedValue([]) };
const resultRepo = { findOne: jest.fn().mockResolvedValue(result) };
const attachmentRepo = { find: jest.fn().mockResolvedValue([]) };
const attendanceRepo = { find: jest.fn().mockResolvedValue([]) };
const service = new ArchiveService(
studentRepo as never,
@@ -26,12 +27,13 @@ describe('ArchiveService.getProfile', () => {
learningRecordRepo as never,
resultRepo as never,
attachmentRepo as never,
attendanceRepo as never,
{} as never,
);
const response = await service.getProfile(7);
expect(response).toMatchObject({ student, result });
expect(response).toMatchObject({ student, result, attendances: [] });
expect(response).not.toHaveProperty('resultArchive');
});
});