(type: Type<unknown>, metadata: Component)
| 2357 | const CREATED_INITIALLY_MARKER = '__ngCreatedInitially__'; |
| 2358 | |
| 2359 | function replaceMetadata(type: Type<unknown>, metadata: Component) { |
| 2360 | ɵɵreplaceMetadata( |
| 2361 | type, |
| 2362 | () => { |
| 2363 | // TODO: the content of this callback is a hacky workaround to invoke the compiler in a test. |
| 2364 | // in reality the callback will be generated by the compiler to be something along the lines |
| 2365 | // of `MyComp[ɵcmp] = /* metadata */`. |
| 2366 | // TODO: in reality this callback should also include `setClassMetadata` and |
| 2367 | // `setClassDebugInfo`. |
| 2368 | (type as any)[ɵNG_COMP_DEF] = null; |
| 2369 | compileComponent(type, metadata); |
| 2370 | }, |
| 2371 | [angularCoreEnv], |
| 2372 | [], |
| 2373 | null, |
| 2374 | '', |
| 2375 | ); |
| 2376 | } |
| 2377 | |
| 2378 | function expectHTML(element: HTMLElement, expectation: string) { |
| 2379 | const actual = element.innerHTML |
no test coverage detected