-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtime
Milestone
Description
@gkalpak and myself saw the below issue when running tests under ivy
Error: ASSERTION ERROR: NgModule 'CompilerModule' is not a subtype of 'NgModuleType'.
at throwError (http://localhost:9876/_karma_webpack_/vendor.js:62601:11)
at assertDefined (http://localhost:9876/_karma_webpack_/vendor.js:62595:9)
at new NgModuleRef$1 (http://localhost:9876/_karma_webpack_/vendor.js:86038:22)
at NgModuleFactory$1.create (http://localhost:9876/_karma_webpack_/vendor.js:86109:16)
It seems the issue is that NGCC only transforms top level modules.
angular/packages/core/testing/src/r3_test_bed_compiler.ts
Lines 551 to 557 in 00ce9aa
| @NgModule({providers}) | |
| class CompilerModule { | |
| } | |
| const CompilerModuleFactory = new R3NgModuleFactory(CompilerModule); | |
| this._injector = CompilerModuleFactory.create(this.platform.injector).injector; | |
| return this._injector; |
with ngcc the output of it is
class CompilerModule {
}
CompilerModule.decorators = [
{ type: NgModule, args: [{ providers },] },
];
/** @type {?} */
const CompilerModuleFactory = new ɵNgModuleFactory(CompilerModule);
this._injector = CompilerModuleFactory.create(this.platform.injector).injector;
return this._injector;Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtime