(type: Type<unknown>, metadata: Component)
| 2382 | const CREATED_INITIALLY_MARKER = '__ngCreatedInitially__'; |
| 2383 | |
| 2384 | function replaceMetadata(type: Type<unknown>, metadata: Component) { |
| 2385 | ɵɵreplaceMetadata( |
| 2386 | type, |
| 2387 | () => { |
| 2388 | // TODO: the content of this callback is a hacky workaround to invoke the compiler in a test. |
| 2389 | // in reality the callback will be generated by the compiler to be something along the lines |
| 2390 | // of `MyComp[ɵcmp] = /* metadata */`. |
| 2391 | // TODO: in reality this callback should also include `setClassMetadata` and |
| 2392 | // `setClassDebugInfo`. |
| 2393 | (type as any)[ɵNG_COMP_DEF] = null; |
| 2394 | compileComponent(type, metadata); |
| 2395 | }, |
| 2396 | [angularCoreEnv], |
| 2397 | [], |
| 2398 | null, |
| 2399 | '', |
| 2400 | ); |
| 2401 | } |
| 2402 | |
| 2403 | function expectHTML(element: HTMLElement, expectation: string) { |
| 2404 | const actual = element.innerHTML |
no test coverage detected
searching dependent graphs…