Я пытаюсь проверить родительские дочерние компоненты, родительский тест выполнен успешно, но дочерний элемент, в котором я вызываю атрибут @output в oninit, не удается "Не удается прочитать свойство 'id' из неопределенного"
export class SinglepostComponent implements OnInit {
@Input() post: Post;
@Input() posts: Array<Post>;
public comments: Array<Comment>;
public comm: Comment;
constructor(
private postService: PostService,
private dataService: DataService,
public dialog: MatDialog,
public commentservice: CommentService
) { }
ngOnInit() {
this.postService.getComments(this.post.id).subscribe(data => {
this.comments = data;
});
}