diff --git a/packages/core/testing/src/r3_test_bed_compiler.ts b/packages/core/testing/src/r3_test_bed_compiler.ts index b2ff479ad2..e18e7f81fa 100644 --- a/packages/core/testing/src/r3_test_bed_compiler.ts +++ b/packages/core/testing/src/r3_test_bed_compiler.ts @@ -548,9 +548,8 @@ export class R3TestBedCompiler { } // TODO(ocombe): make this work with an Injector directly instead of creating a module for it - @NgModule({providers}) - class CompilerModule { - } + class CompilerModule {} + compileNgModuleDefs(CompilerModule as NgModuleType, {providers}); const CompilerModuleFactory = new R3NgModuleFactory(CompilerModule); this._injector = CompilerModuleFactory.create(this.platform.injector).injector;