Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @midwayjs/mock

References

BaseMockApplication

BaseMockApplication:

EggMock

EggMock:

MidwayApplicationOptions

MidwayApplicationOptions:

MidwayMockApplication

MidwayMockApplication:

MidwayMockContext

MidwayMockContext:

MidwaySocketIOClientOptions

MidwaySocketIOClientOptions:

MockApplication

MockApplication:

MockClassFunctionHandler

MockClassFunctionHandler:

MockOption

MockOption:

SocketIOWrapperClient

SocketIOWrapperClient:

close

close:

create

create:

createApp

createApp:

createBootstrap

createBootstrap:

createFunctionApp

createFunctionApp:

createHttpRequest

createHttpRequest:

createLightApp

createLightApp:

createRabbitMQProducer

createRabbitMQProducer:

createSocketIOClient

createSocketIOClient:

createWebSocketClient

createWebSocketClient:

Type aliases

EggContext

EggContext: ReturnType<MockApplication["mockContext"]>
deprecated

MockAppConfigurationOptions

MockAppConfigurationOptions: object

Type declaration

  • Optional baseDir?: string
  • Optional bootstrapTimeout?: number
  • Optional cleanLogsDir?: boolean
  • Optional cleanTempDir?: boolean
  • Optional entryFile?: string

MockClassFunctionHandler

MockClassFunctionHandler: function
deprecated

Type declaration

MockHttpClientResult

MockHttpClientResult: ResultObject | ResultFunction | string

ResultFunction

ResultFunction: function

Type declaration

    • Parameters

      • Optional url: string
      • Optional opts: any

      Returns ResultObject | string | void

Variables

Const EventEmitter

EventEmitter: any = require('events').EventEmitter

Const appMap

appMap: WeakMap<object, any> = new WeakMap()

Const bootstrapAppSet

bootstrapAppSet: Set<object> = (global['MIDWAY_BOOTSTRAP_APP_SET'] = new Set<{framework: IMidwayFramework<any, any>;starter: BootstrapStarter;}>())

Const eventListeners

eventListeners: any[] = []

Const exchanges

exchanges: object

Type declaration

Let lastAppDir

lastAppDir: any

Const queues

queues: object

Type declaration

Functions

close

  • close(app: IMidwayApplication | IMidwayFramework<any, any>, options?: object): Promise<void>

Const connect

  • connect(): Promise<object>

create

createApp

createBootstrap

Const createChannel

  • createChannel(): Promise<object>

Const createConfirmChannel

  • createConfirmChannel(): Promise<object>

Const createConfirmQueue

  • createConfirmQueue(): object

Const createDirectExchange

  • createDirectExchange(): object

Const createFanoutExchange

  • createFanoutExchange(): object

createFunctionApp

Const createHeadersExchange

  • createHeadersExchange(): object

createHttpRequest

createLightApp

Const createQueue

  • createQueue(): object

createRabbitMQProducer

  • createRabbitMQProducer(options: object): Promise<ChannelManager>
  • createRabbitMQProducer(queueName: string, options: object): Promise<ChannelManager>

createSocketIOClient

createWebSocketClient

  • createWebSocketClient(address: string | URL, options?: ClientOptions | ClientRequestArgs): Promise<WebSocket>

findFirstExistModule

  • findFirstExistModule(moduleList: any): string

formatPath

  • formatPath(baseDir: any, p: any): any

getIncludeFramework

  • getIncludeFramework(dependencies: any): string

isTestEnvironment

  • isTestEnvironment(): boolean

isWin32

  • isWin32(): boolean

Const mockClassFunction

Generated using TypeDoc