From 2236ea4359a222ec52d07cc4a967f3c1be269156 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Thu, 25 Apr 2019 21:42:16 +0300 Subject: [PATCH] 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 --- packages/upgrade/src/dynamic/test/upgrade_spec.ts | 4 ++-- .../upgrade/static/test/integration/change_detection_spec.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/upgrade/src/dynamic/test/upgrade_spec.ts b/packages/upgrade/src/dynamic/test/upgrade_spec.ts index acb2892d5a..28ce7155e7 100644 --- a/packages/upgrade/src/dynamic/test/upgrade_spec.ts +++ b/packages/upgrade/src/dynamic/test/upgrade_spec.ts @@ -179,7 +179,7 @@ withEachNg1Version(() => { class Ng2Module { } - const ng1Module = angular.module('ng1', []); + const ng1Module = angular.module_('ng1', []); const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module)); const element = html(''); @@ -315,7 +315,7 @@ withEachNg1Version(() => { // } // const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module)); - // const ng1Module = angular.module('ng1', []).directive( + // const ng1Module = angular.module_('ng1', []).directive( // 'myApp', adapter.downgradeNg2Component(AppComponent)); // const element = html(''); diff --git a/packages/upgrade/static/test/integration/change_detection_spec.ts b/packages/upgrade/static/test/integration/change_detection_spec.ts index cacb7cc806..960224cd79 100644 --- a/packages/upgrade/static/test/integration/change_detection_spec.ts +++ b/packages/upgrade/static/test/integration/change_detection_spec.ts @@ -38,7 +38,7 @@ withEachNg1Version(() => { ngDoBootstrap() {} } - const ng1Module = angular.module('ng1', []).directive( + const ng1Module = angular.module_('ng1', []).directive( 'myApp', downgradeComponent({component: AppComponent})); bootstrap(platformBrowserDynamic(), Ng2Module, element, ng1Module).then((upgrade) => { @@ -193,7 +193,7 @@ withEachNg1Version(() => { // } // const adapter: UpgradeAdapter = new UpgradeAdapter(forwardRef(() => Ng2Module)); - // const ng1Module = angular.module('ng1', []).directive( + // const ng1Module = angular.module_('ng1', []).directive( // 'myApp', adapter.downgradeNg2Component(AppComponent)); // const element = html('');