- Preparing search index...
- The search index is not available
cardano-sdk
Function createGenericMockServer
- createGenericMockServer(listenerGenerator: ListenerGenerator, serverPort?: number): ((handler?: MockHandler) => Promise<{
closeMock: (() => Promise<void>);
serverUrl: string;
}>)
-
Parameters
-
-
Optional
serverPort: number
Returns ((handler?: MockHandler) => Promise<{
closeMock: (() => Promise<void>);
serverUrl: string;
}>)
-
- (handler?: MockHandler): Promise<{
closeMock: (() => Promise<void>);
serverUrl: string;
}>
-
Returns Promise<{
closeMock: (() => Promise<void>);
serverUrl: string;
}>
A factory to create a generic mocked HTTP server for testing purposes
Returns
Object exposing close mock callback and server url