MCPcopy Create free account
hub / github.com/angular/angular / R3TestCompiler

Class R3TestCompiler

packages/core/testing/src/test_bed_compiler.ts:1236–1257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1234}
1235
1236class R3TestCompiler implements Compiler {
1237 constructor(private testBed: TestBedCompiler) {}
1238
1239 compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T> {
1240 this.testBed._compileNgModuleSync(moduleType);
1241 return new R3NgModuleFactory(moduleType);
1242 }
1243
1244 async compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>> {
1245 await this.testBed._compileNgModuleAsync(moduleType);
1246 return new R3NgModuleFactory(moduleType);
1247 }
1248
1249 clearCache(): void {}
1250
1251 clearCacheFor(type: Type<any>): void {}
1252
1253 getModuleId(moduleType: Type<any>): string | undefined {
1254 const meta = this.testBed._getModuleResolver().resolve(moduleType);
1255 return (meta && meta.id) || undefined;
1256 }
1257}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected