nativescript-angular icon indicating copy to clipboard operation
nativescript-angular copied to clipboard

[QUESTION] How would you write unit test on a function that uses RouterExtensions from “nativescript-angular/router” for navigation

Open Denniskamau opened this issue 7 years ago • 2 comments

I have a login function that navigates user to home page on succesfull login

    login() {
        if(this.user){
            this.processing = false;
            this.routerExtensions.navigate(["/home"], { clearHistory: true });
        }else{
            this.processing = false;
            this.alert("Unfortunately we could not find your account.");
        }

    }

A comprehensive understanding of the question can be found here stackoverflow.

Denniskamau avatar Oct 29 '19 18:10 Denniskamau

HI @Denniskamau, You can review our test app here and to use it as a reference.

tsonevn avatar Nov 01 '19 08:11 tsonevn

:wave: @Denniskamau, we use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please, use Stackoverflow to get help.

support avatar Nov 01 '19 08:11 support