(template: string)
| 31 | } |
| 32 | |
| 33 | function getRootNodes(template: string): any[] { |
| 34 | TestBed.configureTestingModule({ |
| 35 | declarations: [App], |
| 36 | }); |
| 37 | TestBed.overrideTemplate(App, template); |
| 38 | const fixture = TestBed.createComponent(App); |
| 39 | fixture.detectChanges(); |
| 40 | |
| 41 | const embeddedView = fixture.componentInstance.templateRef.createEmbeddedView({}); |
| 42 | embeddedView.detectChanges(); |
| 43 | |
| 44 | return embeddedView.rootNodes; |
| 45 | } |
| 46 | |
| 47 | it('should return root render nodes for an embedded view instance', () => { |
| 48 | const rootNodes = getRootNodes( |
no test coverage detected
searching dependent graphs…