This commit is contained in:
2025-12-11 21:06:25 +01:00
parent c49ea2598d
commit ec3ddc3a5c
227 changed files with 3496 additions and 2083 deletions

View File

@@ -19,7 +19,9 @@ describe('CheckoutConfirmation Value Object', () => {
});
it('should throw error for invalid decision', () => {
expect(() => CheckoutConfirmation.create('invalid' as any)).toThrow('Invalid checkout confirmation decision');
expect(() => CheckoutConfirmation.create('invalid')).toThrow(
'Invalid checkout confirmation decision',
);
});
});

View File

@@ -159,7 +159,8 @@ describe('CheckoutPrice Value Object', () => {
const amount = price.getAmount();
expect(amount).toBe(5.00);
// Verify no setters exist
expect(typeof (price as any).setAmount).toBe('undefined');
const mutablePrice = price as unknown as { setAmount?: unknown };
expect(typeof mutablePrice.setAmount).toBe('undefined');
});
});

View File

@@ -93,7 +93,8 @@ describe('CheckoutState Value Object', () => {
const originalState = state.getValue();
expect(originalState).toBe(CheckoutStateEnum.READY);
// Verify no setters exist
expect(typeof (state as any).setState).toBe('undefined');
const mutableState = state as unknown as { setState?: unknown };
expect(typeof mutableState.setState).toBe('undefined');
});
});

View File

@@ -44,11 +44,11 @@ describe('SessionState Value Object', () => {
});
it('should throw error for invalid state', () => {
expect(() => SessionState.create('INVALID' as any)).toThrow('Invalid session state');
expect(() => SessionState.create('INVALID')).toThrow('Invalid session state');
});
it('should throw error for empty string', () => {
expect(() => SessionState.create('' as any)).toThrow('Invalid session state');
expect(() => SessionState.create('')).toThrow('Invalid session state');
});
});