@ngworker/spectacular
Enumerations
Classes
- SpectacularAppComponent
- SpectacularFeatureLocation
- SpectacularFeatureRouter
- SpectacularFeatureTestingModule
- SpectacularFeatureTestingRootModule
- SpectacularPipeHarness
Interfaces
- CreateFeatureHarnessOptions
- CreatePipeHarnessOptions
- ProvideSpectacularFeatureTestOptions
- ProvideSpectacularFeatureTestingOptions
- SpectacularApplicationHarness
- SpectacularFeatureHarness
- SpectacularFeatureTestingFeature
- SpectacularFeatureTestingModuleOptions
Type Aliases
CreateApplicationHarnessOptions
Ƭ CreateApplicationHarnessOptions: Pick
<NgModule
, "imports"
| "providers"
>
Application harness options.
Defined in
InitialFeatureNavigationFeature
Ƭ InitialFeatureNavigationFeature: SpectacularFeatureTestingFeature
<InitialFeatureNavigationFeature
>
A type alias that represents a feature which enables initial navigation to the specified feature path.
The type is used to describe the return value of the withInitialFeatureNavigation function.
See
Defined in
packages/spectacular/src/lib/feature-testing/configuration/with-initial-feature-navigation.ts:19
SpectacularFeatureTestingFeatures
Ƭ SpectacularFeatureTestingFeatures: InitialFeatureNavigationFeature
A type alias that represents all tree-shakable Spectacular Feature Testing features available for use with provideSpectacularFeatureTesting. Features can be enabled by adding special functions to the provideSpectacularFeatureTesting call.
See documentation for each symbol to find its corresponding function name. See also provideSpectacularFeatureTesting documentation on how to use those functions.
See
provideSpectacularFeatureTesting
Defined in
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
Name | Type |
---|---|
options | CreateApplicationHarnessOptions |
Returns
Promise
<SpectacularApplicationHarness
>
Defined in
createFeatureHarness
▸ createFeatureHarness(options
): SpectacularFeatureHarness
Configure feature testing environment, bootstrap SpectacularAppComponent
,
and navigate to the default feature route.
Parameters
Name | Type |
---|---|
options | CreateFeatureHarnessOptions |
Returns
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
Name | Type |
---|---|
options | CreatePipeHarnessOptions <TValue > |
Returns
SpectacularPipeHarness
<TValue
>
Defined in
packages/spectacular/src/lib/pipe-testing/pipe-harness/create-pipe-harness.ts:57
provideSpectacularFeatureTest
▸ provideSpectacularFeatureTest(options
, ...features
): (EnvironmentProviders
| Provider
)[]
Provide dependencies needed by the Spectacular Feature testing API.
Deprecated
Deprecated in favor of provideSpectacularFeatureTesting. To be removed in Spectacular 16.0.
Parameters
Name | Type |
---|---|
options | ProvideSpectacularFeatureTestOptions |
...features | (InitialFeatureNavigationFeature | RouterFeatures )[] |
Returns
(EnvironmentProviders
| Provider
)[]
Defined in
packages/spectacular/src/lib/feature-testing/configuration/provide-spectacular-feature-test.ts:25
provideSpectacularFeatureTesting
▸ provideSpectacularFeatureTesting(options
, ...features
): (EnvironmentProviders
| Provider
)[]
Provide dependencies needed by the Spectacular Feature testing API.
Parameters
Name | Type |
---|---|
options | ProvideSpectacularFeatureTestingOptions |
...features | (InitialFeatureNavigationFeature | RouterFeatures )[] |
Returns
(EnvironmentProviders
| Provider
)[]
Defined in
packages/spectacular/src/lib/feature-testing/configuration/provide-spectacular-feature-testing.ts:36
withInitialFeatureNavigation
▸ withInitialFeatureNavigation(): InitialFeatureNavigationFeature
Navigate to the specified feature path when the test is initialized.
Example
providers: [
provideSpectacularFeatureTesting(
{
featurePath: 'heroes',
routes: [
{ path: 'heroes', loadChildren: () => heroesRoutes },
],
},
withInitialFeatureNavigation(),
),
],
Returns
InitialFeatureNavigationFeature
Defined in
packages/spectacular/src/lib/feature-testing/configuration/with-initial-feature-navigation.ts:40