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, userId: mockTargetUserId,
schemeId: mockSchemeId, schemeId: mockSchemeId,
startsAt: expect.any(Date), startsAt: expect.any(Date),
endsAt: null, endsAt: undefined,
customRate: null, customRate: null,
isActive: true, isActive: true,
createdAt: expect.any(Date), createdAt: expect.any(Date),

View File

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

View File

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