Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should display structural directive content', () => {
const mockedDirective = MockHelper
.findDirective(fixture.debugElement, ExampleStructuralDirective) as MockedDirective;
// structural directives should be rendered first.
mockedDirective.__render();
fixture.detectChanges();
expect(mockedDirective.exampleStructuralDirective).toBeTruthy();
const debugElement = fixture.debugElement.query(By.css('#example-structural-directive'));
expect(debugElement.nativeElement.innerHTML).toContain('hi');
});