fix adapters
This commit is contained in:
21
adapters/media/ports/InMemoryFaceValidationAdapter.test.ts
Normal file
21
adapters/media/ports/InMemoryFaceValidationAdapter.test.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
import { InMemoryFaceValidationAdapter } from './InMemoryFaceValidationAdapter';
|
||||
|
||||
describe('InMemoryFaceValidationAdapter', () => {
|
||||
it('validates face photos as valid (mock)', async () => {
|
||||
const logger = {
|
||||
debug: vi.fn(),
|
||||
info: vi.fn(),
|
||||
warn: vi.fn(),
|
||||
error: vi.fn(),
|
||||
} as unknown as Logger;
|
||||
|
||||
const adapter = new InMemoryFaceValidationAdapter(logger);
|
||||
|
||||
const result = await adapter.validateFacePhoto('data');
|
||||
expect(result.isValid).toBe(true);
|
||||
expect(result.hasFace).toBe(true);
|
||||
expect(result.faceCount).toBe(1);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user