【发布时间】:2019-01-10 10:15:04
【问题描述】:
我有ViewChild 和set content。
我想知道如何使用单元测试来测试这段代码。
这张图片是代码覆盖率
@ViewChild(MatSort) set content(content: ElementRef) {
this.sort = content;
Iif (this.sort) {
this.historyReport.sort = this.sort;
}
}
【问题讨论】:
标签: angular typescript unit-testing angular6 karma-jasmine