Skip to content

PURISTA API


PURISTA API / @purista/core / CommandContextMockResult

Type Alias: CommandContextMockResult<TBuilder>

CommandContextMockResult<TBuilder> = object

Defined in: testing/createCommandContextMock.ts:57

Type Parameters

TBuilder

TBuilder extends CommandDefinitionBuilder<any, any>

Properties

context

context: CommandFunctionContext<GetMessagePayloadType<CommandContextMockBuilderTypes<TBuilder>["PayloadSchema"], CommandContextMockBuilderTypes<TBuilder>["TransformInputPayloadSchema"]>, GetMessageParamsType<CommandContextMockBuilderTypes<TBuilder>["ParamsSchema"], CommandContextMockBuilderTypes<TBuilder>["TransformInputParamsSchema"]>, CommandContextMockBuilderTypes<TBuilder>["Resources"], CommandContextMockBuilderTypes<TBuilder>["Invokes"], CommandContextMockBuilderTypes<TBuilder>["StreamInvokes"], CommandContextMockBuilderTypes<TBuilder>["EmitList"], CommandContextMockBuilderTypes<TBuilder>["QueueInvokes"], ServiceClassMetrics<CommandContextMockServiceClass<TBuilder>>>

Defined in: testing/createCommandContextMock.ts:58


mock

mock: CommandFunctionContext<GetMessagePayloadType<CommandContextMockBuilderTypes<TBuilder>["PayloadSchema"], CommandContextMockBuilderTypes<TBuilder>["TransformInputPayloadSchema"]>, GetMessageParamsType<CommandContextMockBuilderTypes<TBuilder>["ParamsSchema"], CommandContextMockBuilderTypes<TBuilder>["TransformInputParamsSchema"]>, CommandContextMockBuilderTypes<TBuilder>["Resources"], CommandContextMockBuilderTypes<TBuilder>["Invokes"], CommandContextMockBuilderTypes<TBuilder>["StreamInvokes"], CommandContextMockBuilderTypes<TBuilder>["EmitList"], CommandContextMockBuilderTypes<TBuilder>["QueueInvokes"], ServiceClassMetrics<CommandContextMockServiceClass<TBuilder>>>

Defined in: testing/createCommandContextMock.ts:74


stubs

stubs: object

Defined in: testing/createCommandContextMock.ts:90

emit

emit: FromEmitToOtherType<CommandContextMockBuilderTypes<TBuilder>["EmitList"], SinonStub>

enqueue

enqueue: SinonStub

getConfig

getConfig: SinonStub

getSecret

getSecret: SinonStub

getState

getState: SinonStub

invoke

invoke: SinonStub

logger

logger: Record<string, SinonStub>

removeConfig

removeConfig: SinonStub

removeSecret

removeSecret: SinonStub

removeState

removeState: SinonStub

resources

resources: Partial<CommandContextMockBuilderTypes<TBuilder>["Resources"]>

scheduleAt

scheduleAt: SinonStub

service

service: Record<string, any>

setConfig

setConfig: SinonStub

setSecret

setSecret: SinonStub

setState

setState: SinonStub

startActiveSpan

startActiveSpan: SinonStub

wrapInSpan

wrapInSpan: SinonStub