Skip to main content

ComponentTestHarness

@prismatic-io/spectral"testing"ComponentTestHarness

Type parameters

TComponent: Component

Hierarchy

  • ComponentTestHarness

Index

Constructors

Properties

Methods

Constructors

constructor

+ new ComponentTestHarness(component: TComponent): ComponentTestHarness

Defined in packages/spectral/src/testing.ts:363

Parameters:

NameType
componentTComponent

Returns: ComponentTestHarness

Properties

component

component: TComponent

Defined in packages/spectral/src/testing.ts:363

Methods

action

actionTConfigVars›(key: string, params?: Record‹string, unknown›, context?: Partial‹ActionContext‹TConfigVars››): Promise‹ActionPerformReturn

Defined in packages/spectral/src/testing.ts:443

Type parameters:

TConfigVars: ConfigVarResultCollection

Parameters:

NameType
keystring
params?Record‹string, unknown›
context?Partial‹ActionContext‹TConfigVars››

Returns: Promise‹ActionPerformReturn


Private buildParams

buildParams(inputs: Input[], params?: Record‹string, unknown›): Record‹string, unknown›

Defined in packages/spectral/src/testing.ts:369

Parameters:

NameType
inputsInput[]
params?Record‹string, unknown›

Returns: Record‹string, unknown›


connectionValue

connectionValue(__namedParameters: object): ConnectionValue

Defined in packages/spectral/src/testing.ts:383

Parameters:

__namedParameters: object

NameType
keystring

Returns: ConnectionValue


dataSource

dataSourceTConfigVars›(key: string, params?: Record‹string, unknown›, context?: Partial‹DataSourceContext‹TConfigVars››): Promise‹DataSourceResult

Defined in packages/spectral/src/testing.ts:455

Type parameters:

TConfigVars: ConfigVarResultCollection

Parameters:

NameType
keystring
params?Record‹string, unknown›
context?Partial‹DataSourceContext‹TConfigVars››

Returns: Promise‹DataSourceResult


trigger

triggerTConfigVars›(key: string, payload?: TriggerPayload, params?: Record‹string, unknown›, context?: Partial‹ActionContext‹TConfigVars››): Promise‹TriggerResult

Defined in packages/spectral/src/testing.ts:395

Type parameters:

TConfigVars: ConfigVarResultCollection

Parameters:

NameType
keystring
payload?TriggerPayload
params?Record‹string, unknown›
context?Partial‹ActionContext‹TConfigVars››

Returns: Promise‹TriggerResult


triggerOnInstanceDelete

triggerOnInstanceDeleteTConfigVars›(key: string, params?: Record‹string, unknown›, context?: Partial‹ActionContext‹TConfigVars››): Promise‹void | TriggerEventFunctionReturn

Defined in packages/spectral/src/testing.ts:426

Type parameters:

TConfigVars: ConfigVarResultCollection

Parameters:

NameType
keystring
params?Record‹string, unknown›
context?Partial‹ActionContext‹TConfigVars››

Returns: Promise‹void | TriggerEventFunctionReturn


triggerOnInstanceDeploy

triggerOnInstanceDeployTConfigVars›(key: string, params?: Record‹string, unknown›, context?: Partial‹ActionContext‹TConfigVars››): Promise‹void | TriggerEventFunctionReturn

Defined in packages/spectral/src/testing.ts:409

Type parameters:

TConfigVars: ConfigVarResultCollection

Parameters:

NameType
keystring
params?Record‹string, unknown›
context?Partial‹ActionContext‹TConfigVars››

Returns: Promise‹void | TriggerEventFunctionReturn