I am new to angular jasmine testing and stuck on how to test void functions. Please help me with below code on how do i test ngOnInit and submit function.
ngOnInit() {
this.loginForm = this.fb.group({
userName: ['', [Validators.required, Validators.minLength(8), Validators.maxLength(16)]],
password: ['', [Validators.required, Validators.minLength(8), Validators.maxLength(16)]],
});
}
submitForm() {
this.router.navigate(['home']);
}
Comments
Post a Comment