【发布时间】:2019-11-27 14:17:47
【问题描述】:
Dname = JSON.stringify(this.userDetails);
Dpass = JSON.stringify({
userName: 'test',
password: 'test'
});
onSubmit() {
this.userDetails = this.inputForm.value;
this.submitted = true;
if (this.Dname === this.Dpass) {
this.router.navigate(['/page1']);
console.log('ok');
} else {
console.log('not ok');
}
}
If path not taken --can someone help me to solve this issue in angular unit testing
【问题讨论】:
-
不是图片,为什么不复制粘贴代码?
-
图像很难处理 - 请粘贴代码
-
我分享了代码截图
-
嗨托尼,欢迎来到 stackoverflow。不要气馁,很多新的贡献者都会发布代码图片,但这是一个容易修复的错误。确保为所有未来的问题发布文本
-
嗨 byxor ..对不起,我对此很陌生..感谢您的指导..我现在已经上传了我的代码 sn-p..提前谢谢大家
标签: angular unit-testing karma-jasmine