Skip to main content
Version: 14.0

@ngworker/spectacular

Classes

Interfaces

Type Aliases

CreateApplicationHarnessOptions

Ƭ CreateApplicationHarnessOptions: Pick<NgModule, "imports" | "providers">

Application harness options.

Defined in

packages/spectacular/src/lib/application-testing/application-harness/create-application-harness.ts:16

Variables

spectacularAppTag

Const spectacularAppTag: "spectacular-app"

The tag name of SpectacularAppComponent's DOM element.

Defined in

packages/spectacular/src/lib/shared/app-component/spectacular-app.component.ts:7

Functions

createApplicationHarness

createApplicationHarness(options?): Promise<SpectacularApplicationHarness>

Bootstrap a test application with the specified metadata. Useful to test configuration Angular modules, bootstrap listeners, and application initializers.

Parameters

NameType
optionsCreateApplicationHarnessOptions

Returns

Promise<SpectacularApplicationHarness>

Defined in

packages/spectacular/src/lib/application-testing/application-harness/create-application-harness.ts:26


createFeatureHarness

createFeatureHarness(options): SpectacularFeatureHarness

Configure SpectacularFeatureTestingModule, bootstrap SpectacularAppComponent and navigate to the default feature route.

Parameters

NameType
optionsCreateFeatureHarnessOptions

Returns

SpectacularFeatureHarness

Defined in

packages/spectacular/src/lib/feature-testing/feature-harness/create-feature-harness.ts:43


createPipeHarness

createPipeHarness<TValue>(options): SpectacularPipeHarness<TValue>

Set up a host component for the Angular pipe under test.

Test it by updating the value and reading the rendered text.

Type parameters

Name
TValue

Parameters

NameType
optionsCreatePipeHarnessOptions<TValue>

Returns

SpectacularPipeHarness<TValue>

Defined in

packages/spectacular/src/lib/pipe-testing/pipe-harness/create-pipe-harness.ts:56


provideSpectacularFeatureTest

provideSpectacularFeatureTest(options): Provider[]

Provide dependencies needed by the Spectacular Feature testing API.

Parameters

NameType
optionsProvideSpectacularFeatureTestOptions

Returns

Provider[]

Defined in

packages/spectacular/src/lib/feature-testing/configuration/provide-spectacular-feature-test.ts:20