質問

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

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top