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
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:
@@ -216,7 +216,7 @@ describe('Company', () => {
|
||||
id: 'comp-123',
|
||||
name: 'Acme Racing Team',
|
||||
ownerUserId: 'user-123',
|
||||
contactEmail: null as any,
|
||||
contactEmail: null,
|
||||
createdAt,
|
||||
});
|
||||
|
||||
|
||||
@@ -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 () => {
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user