jeudi 23 juillet 2015

How to get 100% of karma branch code coverage in typescript angular app?

I write my angular application with karma and jasmin unit tests. I got code in typescript:

module app {
  ...
}

which generates to javascript like:

var app;
(function (app) {
...
})(app || (app = {}));

Now when I run karma-coverage it shows me that one branch is skipped and it's || (app = {})); this one. It happens when I test more files which got app module.

How can I test it in jasmine, to get 100% branch coverage?

Aucun commentaire:

Enregistrer un commentaire