feat(upgrade): enable Angular 1 unit testing of upgrade module
- New method `UpgradeAdapter.registerForNg1Tests(modules)` declares the Angular 1 upgrade module and provides it to the `angular.mock.module()` helper. This prevents the need to bootstrap the entire hybrid for every test. Closes #5462, #12675
This commit is contained in:

committed by
Victor Berchet

parent
86c50983d7
commit
2fc0560988
1
tools/public_api_guard/upgrade/index.d.ts
vendored
1
tools/public_api_guard/upgrade/index.d.ts
vendored
@ -4,6 +4,7 @@ export declare class UpgradeAdapter {
|
||||
bootstrap(element: Element, modules?: any[], config?: angular.IAngularBootstrapConfig): UpgradeAdapterRef;
|
||||
downgradeNg2Component(type: Type<any>): Function;
|
||||
downgradeNg2Provider(token: any): Function;
|
||||
registerForNg1Tests(modules?: string[]): UpgradeAdapterRef;
|
||||
upgradeNg1Component(name: string): Type<any>;
|
||||
upgradeNg1Provider(name: string, options?: {
|
||||
asToken: any;
|
||||
|
Reference in New Issue
Block a user