code quality
Some checks failed
CI / lint-typecheck (pull_request) Failing after 12s
CI / tests (pull_request) Has been skipped
CI / contract-tests (pull_request) Has been skipped
CI / e2e-tests (pull_request) Has been skipped
CI / comment-pr (pull_request) Has been skipped
CI / commit-types (pull_request) Has been skipped

This commit is contained in:
2026-01-26 02:27:37 +01:00
parent bf2c0fdb0c
commit afef777961
23 changed files with 565 additions and 134 deletions

View File

@@ -216,7 +216,7 @@ describe('Company', () => {
id: 'comp-123',
name: 'Acme Racing Team',
ownerUserId: 'user-123',
contactEmail: null as any,
contactEmail: null,
createdAt,
});

View File

@@ -133,7 +133,7 @@ describe('PasswordHashingService', () => {
it('should reject verification with null hash', async () => {
// bcrypt throws an error when hash is null, which is expected behavior
await expect(service.verify('password', null as any)).rejects.toThrow();
await expect(service.verify('password', null as unknown as string)).rejects.toThrow();
});
it('should reject verification with empty hash', async () => {

View File

@@ -216,17 +216,17 @@ describe('EmailAddress', () => {
describe('Edge cases', () => {
it('should handle null input gracefully', () => {
const result = validateEmail(null as any);
const result = validateEmail(null as unknown as string);
expect(result.success).toBe(false);
});
it('should handle undefined input gracefully', () => {
const result = validateEmail(undefined as any);
const result = validateEmail(undefined as unknown as string);
expect(result.success).toBe(false);
});
it('should handle non-string input gracefully', () => {
const result = validateEmail(123 as any);
const result = validateEmail(123 as unknown as string);
expect(result.success).toBe(false);
});
});
@@ -305,13 +305,13 @@ describe('EmailAddress', () => {
it('should handle null input', () => {
// The current implementation throws an error when given null
// This is expected behavior - the function expects a string
expect(() => isDisposableEmail(null as any)).toThrow();
expect(() => isDisposableEmail(null as unknown as string)).toThrow();
});
it('should handle undefined input', () => {
// The current implementation throws an error when given undefined
// This is expected behavior - the function expects a string
expect(() => isDisposableEmail(undefined as any)).toThrow();
expect(() => isDisposableEmail(undefined as unknown as string)).toThrow();
});
});
});