Pregunta

The following code snippet has only 50% branch coverage (see below for coverage report) I'm not sure how to improve this since there are no if statements.

I'm thinking Istanbul must do some sort of measuring that i don't fully understand, any pointers are appreciated.

angular
.module("konakFront", [
    "ngRoute"
])
.config(function ($routeProvider) {
    "use strict";
    $routeProvider
        .when("/", {
            templateUrl: "views/main.html",
            controller: "MainCtrl"
        })
        .otherwise({
            redirectTo: "/"
        });
});

Istanbul Coverage

¿Fue útil?

Solución

This was related due to the accidental double instrumentation of the file. More info can be found here:

https://github.com/gotwarlost/istanbul/issues/123

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top