wip league admin tools

This commit is contained in:
2025-12-28 12:04:12 +01:00
parent 5dc8c2399c
commit 6edf12fda8
401 changed files with 15365 additions and 6047 deletions

View File

@@ -21,17 +21,17 @@ describe('Season aggregate lifecycle', () => {
const planned = createMinimalSeason({ status: 'planned' });
const activated = planned.activate();
expect(activated.status).toBe('active');
expect(activated.status.toString()).toBe('active');
expect(activated.startDate).toBeInstanceOf(Date);
expect(activated.endDate).toBeUndefined();
const completed = activated.complete();
expect(completed.status).toBe('completed');
expect(completed.status.toString()).toBe('completed');
expect(completed.startDate).toEqual(activated.startDate);
expect(completed.endDate).toBeInstanceOf(Date);
const archived = completed.archive();
expect(archived.status).toBe('archived');
expect(archived.status.toString()).toBe('archived');
expect(archived.startDate).toEqual(completed.startDate);
expect(archived.endDate).toEqual(completed.endDate);
});
@@ -79,12 +79,12 @@ describe('Season aggregate lifecycle', () => {
const archived = createMinimalSeason({ status: 'archived' });
const cancelledFromPlanned = planned.cancel();
expect(cancelledFromPlanned.status).toBe('cancelled');
expect(cancelledFromPlanned.status.toString()).toBe('cancelled');
expect(cancelledFromPlanned.startDate).toBe(planned.startDate);
expect(cancelledFromPlanned.endDate).toBeInstanceOf(Date);
const cancelledFromActive = active.cancel();
expect(cancelledFromActive.status).toBe('cancelled');
expect(cancelledFromActive.status.toString()).toBe('cancelled');
expect(cancelledFromActive.startDate).toBe(active.startDate);
expect(cancelledFromActive.endDate).toBeInstanceOf(Date);