Vote count:
0
I'm using Angular with Coffeescript and testing with Karma, Mocha and Chai (and Karma-coverage which uses istanbul for the coverage tool) I have these lines in my controller
$scope.selected_company_id_match = match: ""
$scope.selected_service_id_match = match: ""
$scope.selected_payment_id_match = match: ""
$scope.selected_language_id_match = match: ""
In my test I have
it "should have id matches for all the multi selects",->
expect(scope.selected_company_id_match.match).to.equal ""
expect(scope.selected_service_id_match.match).to.equal ""
expect(scope.selected_payment_id_match.match).to.equal ""
expect(scope.selected_language_id_match.match).to.equal ""
The controller lines execute when the script loads (they're not inside any function) But the code coverage report still says they're not covered, even though I explicitly test for them. Why aren't they considered covered and how can i cover them?
asked 1 min ago
Why does my karma-coverage (istanbul) report say that these lines aren't covered?
Aucun commentaire:
Enregistrer un commentaire