test(upgrade): rename `angular.module()` to `angular.module_()` (#30126)

With #30058, the ngUpgrade internal `angular.module()` method was
renamed to `angular.module_()` (to avoid a webpack bug).

Merging #29794 afterwards resulted in some broken tests, because it
still used the old `angular.module()` method name. (The PR had been
tested on CI against a revision that did not contain the rename.)

This commit fixes the broken tests by renaming the remaining occurrences
of `angular.module()`.

PR Close #30126
This commit is contained in:
George Kalpakas 2019-04-25 21:42:16 +03:00 committed by Andrew Kushnir
parent 0ddf2e7a5b
commit 2236ea4359
2 changed files with 4 additions and 4 deletions

View File

@ -179,7 +179,7 @@ withEachNg1Version(() => {
class Ng2Module { class Ng2Module {
} }
const ng1Module = angular.module('ng1', []); const ng1Module = angular.module_('ng1', []);
const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module)); const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module));
const element = html('<my-app></my-app>'); const element = html('<my-app></my-app>');
@ -315,7 +315,7 @@ withEachNg1Version(() => {
// } // }
// const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module)); // const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module));
// const ng1Module = angular.module('ng1', []).directive( // const ng1Module = angular.module_('ng1', []).directive(
// 'myApp', adapter.downgradeNg2Component(AppComponent)); // 'myApp', adapter.downgradeNg2Component(AppComponent));
// const element = html('<my-app></my-app>'); // const element = html('<my-app></my-app>');

View File

@ -38,7 +38,7 @@ withEachNg1Version(() => {
ngDoBootstrap() {} ngDoBootstrap() {}
} }
const ng1Module = angular.module('ng1', []).directive( const ng1Module = angular.module_('ng1', []).directive(
'myApp', downgradeComponent({component: AppComponent})); 'myApp', downgradeComponent({component: AppComponent}));
bootstrap(platformBrowserDynamic(), Ng2Module, element, ng1Module).then((upgrade) => { bootstrap(platformBrowserDynamic(), Ng2Module, element, ng1Module).then((upgrade) => {
@ -193,7 +193,7 @@ withEachNg1Version(() => {
// } // }
// const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module)); // const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module));
// const ng1Module = angular.module('ng1', []).directive( // const ng1Module = angular.module_('ng1', []).directive(
// 'myApp', adapter.downgradeNg2Component(AppComponent)); // 'myApp', adapter.downgradeNg2Component(AppComponent));
// const element = html('<my-app></my-app>'); // const element = html('<my-app></my-app>');