test: correct service spec

This commit is contained in:
izzy
2026-01-07 12:40:29 +00:00
parent 7e0e4bd0c6
commit 5f35abbaa5
2 changed files with 4 additions and 4 deletions

View File

@@ -76,7 +76,7 @@ export class IntegrityRepository {
return {
items: items.slice(0, pagination.limit),
nextCursor: items[pagination.limit]?.id,
nextCursor: items[pagination.limit]?.id as string | undefined,
};
}

View File

@@ -28,16 +28,16 @@ describe(IntegrityService.name, () => {
it('gets report', async () => {
mocks.integrityReport.getIntegrityReports.mockResolvedValue({
items: [],
hasNextPage: false,
nextCursor: undefined,
});
await expect(sut.getIntegrityReport({ type: IntegrityReportType.ChecksumFail })).resolves.toEqual({
items: [],
hasNextPage: false,
nextCursor: undefined,
});
expect(mocks.integrityReport.getIntegrityReports).toHaveBeenCalledWith(
{ page: 1, size: 100 },
{ cursor: undefined, limit: 100 },
IntegrityReportType.ChecksumFail,
);
});