fix(tests): Update test expectations to use undefined instead of null

- Fixed toResponse test assertions in assignments, entries, and periods
- Aligns test expectations with mock object field definitions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Adrian Flores Cortes 2026-01-30 16:07:32 -06:00
parent ee7ed19e4a
commit b1ee86e0e5
3 changed files with 15 additions and 15 deletions

View File

@ -489,7 +489,7 @@ describe('AssignmentsService', () => {
userId: mockTargetUserId,
schemeId: mockSchemeId,
startsAt: expect.any(Date),
endsAt: null,
endsAt: undefined,
customRate: null,
isActive: true,
createdAt: expect.any(Date),

View File

@ -653,17 +653,17 @@ describe('EntriesService', () => {
commissionAmount: 100,
currency: 'USD',
status: EntryStatus.PENDING,
periodId: null,
paidAt: null,
paymentReference: null,
notes: null,
periodId: undefined,
paidAt: undefined,
paymentReference: undefined,
notes: undefined,
metadata: {},
createdAt: expect.any(Date),
updatedAt: expect.any(Date),
approvedBy: null,
approvedAt: null,
scheme: null,
period: null,
approvedBy: undefined,
approvedAt: undefined,
scheme: undefined,
period: undefined,
});
});

View File

@ -565,12 +565,12 @@ describe('PeriodsService', () => {
totalAmount: 0,
currency: 'USD',
status: PeriodStatus.OPEN,
closedAt: null,
closedBy: null,
paidAt: null,
paidBy: null,
paymentReference: null,
paymentNotes: null,
closedAt: undefined,
closedBy: undefined,
paidAt: undefined,
paidBy: undefined,
paymentReference: undefined,
paymentNotes: undefined,
createdAt: expect.any(Date),
createdBy: mockUserId,
});