Hi,

In case you are still looking for an answer, you have to revert to a test 
host component
https://angular.io/guide/testing#test-a-component-inside-a-test-host-component

In your test, you create a dummy component holding the one you want to test 
(my-com):
@Component({
    template: `<my-com title="foo">Hello world</my-com>`
})
class TestHostComponent {
}

Then you can follow the directions on the link to the doc provided above to:
1) inject that test host component as well as the component under test 
(MyComponent).
2) call fixture = TestBed.createComponent(TestHostComponent);
3) use CSS queries to get back to what you'd like to test

Hope this helps


-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to