UNPKG

wa-chat-server

Version:

Watson Assistant powered chat server

51 lines (50 loc) 2.06 kB
export declare class WatsonWrapperTest { private schemaDir; private config; constructor(); private getLogger; private getWatsonSimpleRequest; private getWatsonSimpleRequestCleanedCtx; private getSimpleJsonSchema; private getWatsonComplexRequest; /** * Parameters from meta are added to Watson context */ private metaParametersTest; /** * An exception must be thrown if the watson context variable $request-service specifies * an unknown service */ private conversationServiceUnknownServiceTest; /** * Verifies that the watson context variables $request-params-* are correctly transformed to * the conversation service request */ private conversationServiceRequestComputationTest; /** * Tests that en error is throws if the conversation service requires a request validation * and the request is not in line with the corresponding JSON schema */ private conversationServiceInvalidRequestTest; /** * Tests that a simple conversation service with no request/response validation results in * a second watson call and that the service response is correctly mapped to the watson context * of this second call */ private conversationServiceWithoutValidationTest; /** * An error must be thrown if the conversation service requires a response validation and * the returned object is not in line with the corresponding JSON schema */ private conversationServiceInvalidResponseTest; /** * The failure of the conversation service must result in a second watson call; information about * the failure must be correclty propagated to the watson context */ private conversationServiceFailureTest; private conversationServiceResponseMappingToRootTest; private conversationServiceResponseMappingToCustomLocTest; private conversationServiceErrorMappingToCustomLocTest; private conversationServiceUnsupportedPrimitiveResponseMappingTest; test(): Promise<void>; }