dimanche 24 juillet 2016

Should I unit test $routeProvider when() settings to prevent app from breaking at run time?

$routeProvider.when('/login', {
    templateUrl: 'app/login.html',
    controller: 'LoginController as vm'
});

If I change vm to (say) avm, it passes unit tests, runs but breaks the view on run time.

enter image description here

This can be caught by functional tests, but that's too slow. Any thought about this situation is welcome.

If I can, how would I do that?

Aucun commentaire:

Enregistrer un commentaire