test(auth): add unit tests for KYC presigned upload and submit handlers

Cover GenerateKycUploadUrlsHandler (10 tests) and SubmitKycHandler (10 tests):
presigned URL flow, legacy file upload, status validation, error handling.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-16 13:19:44 +07:00
parent 5810f0be56
commit 57db3fe388
9 changed files with 559 additions and 20 deletions

View File

@@ -61,7 +61,7 @@ export class McpRegistryService implements OnModuleInit {
this.servers.set(
'reports',
createReportsServer({
aiServiceBaseUrl: this.options.aiServiceBaseUrl,
apiBaseUrl: this.options.apiBaseUrl ?? this.options.aiServiceBaseUrl,
}),
);
}

View File

@@ -5,6 +5,8 @@ import { MCP_MODULE_OPTIONS } from './mcp.constants';
export interface McpModuleOptions {
aiServiceBaseUrl: string;
/** Base URL for the NestJS API (e.g. http://localhost:3001/api/v1). Used by MCP servers that call NestJS endpoints instead of the AI service. */
apiBaseUrl?: string;
typesenseCollectionName?: string;
/** When true, the built-in McpTransportController is NOT registered — useful when the host app provides its own authenticated controller. */
skipDefaultController?: boolean;