【发布时间】:2019-11-20 09:24:18
【问题描述】:
我检查了很多文章和答案,但我似乎没有找到正确的方法来模拟我的方法 HTTP Requests。我想独立于backend 测试我的frontend 应用程序。这是我拥有的方法类型:
private getProfile() {
this.http
.get('go/profile/get', {withCredentials: true})
.subscribe((profile: Profile) => {
this.user.profile = profile;
this.updateLineMsgs();
});
}
有什么建议吗?
【问题讨论】:
标签: angular unit-testing jasmine karma-jasmine angular-test