Spectacular 15.0.0-alpha.0
Pre-release
Pre-release
LayZeeDK
released this
30 Jul 22:37
·
37 commits
to main
since this release
15.0.0-alpha.0 (2023-07-31)
Features
SpectacularAppComponent
is a standalone Angular component (#68)- Passing
InjectOptions
toSpectacularApplicationHarness#inject
is supported (#68) - Passing
InjectOptions
toSpectacularFeatureHarness#inject
is supported (#68) - Passing
InjectOptions
toSpectacularPipeHarnes#inject
is supported (#68)
BREAKING CHANGES
- Require Angular 15.0
SpectacularAppComponent
is a standalone Angular component. Your tests might need to take this into account depending on your setup. Most tests shouldn't need to change.
Migration
Feature test using Angular Testing Library
Before:
await render(SpectacularAppComponent, {
excludeComponentDeclaration: true,
imports: [
SpectacularFeatureTestingModule.withFeature({
featurePath: crisisCenterPath,
routes: [
{ path: crisisCenterPath, loadChildren: () => CrisisCenterModule },
],
}),
],
});
After:
await render(SpectacularAppComponent, {
providers: [
provideSpectacularFeatureTesting({
featurePath: crisisCenterPath,
routes: [
{ path: crisisCenterPath, loadChildren: () => CrisisCenterModule },
],
}),
],
});
DEPRECATIONS
- Passing
InjectFlags
toSpectacularApplicationHarness#inject
is deprecated in favor of passingInjectOptions
(#68) - Passing
InjectFlags
toSpectacularFeatureHarness#inject
is deprecated in favor of passingInjectOptions
(#68) - Passing
InjectFlags
toSpectacularPipeHarnes#inject
is deprecated in favor of passingInjectOptions
(#68)
Migration
InjectFlags to InjectOptions
Before:
const ngZone = harness.inject(NgZone, InjectFlags.Optional);
After:
const ngZone = harness.inject(NgZone, {
optional: true
});