lathonez / clicker

Ionic 2 + @angular/cli Seed Project : Angular2 + Typescript + Karma + Protractor + Travis
http://lathonez.com/2018/ionic-2-unit-testing/
MIT License
430 stars 137 forks source link

100% coverage #242

Closed hfwittmann closed 7 years ago

hfwittmann commented 7 years ago

Hi Stephen,

quick question: do you subscribe to the 100% coverage mantra (as promulgated by e.g. Eran Hammer)?

I suppose the answer is no, since the tests in this project are close to 100%, but not exactly 100%.

Further Remarks: I have noticed that e.g. the ionic specific command ionViewDidLoad is not triggered automatically by the component compilation in the unit tests. I am surprised it is not triggered automatically, do you agree?

It can be done through e.g.

fixture.componentInstance.ionViewDidLoad();

Is it - in your opinion - useful to do this (in order to achieve the 100%) ?

Cheers, Felix

lathonez commented 7 years ago

Hey Felix,

More coverage is obviously better, but I wouldn't break my back to achieve 100% if something was, somehow, untestable.

That On Tue, 25 Apr 2017 at 00:31, Felix Wittmann notifications@github.com wrote:

Hi Stephen,

quick question: do you subscribe to the 100% coverage mantra (as promulgated by e.g. Eran Hammer)?

I suppose the answer is no, since the tests in this project are close to 100%, but not exactly 100%.

Further Remarks: I have noticed that e.g. the ionic specific command ionViewDidLoad is not triggered automatically by the component compilation in the unit tests. I am surprised it is not triggered automatically, do you agree?

It can be done through e.g.

fixture.componentInstance.ionViewDidLoad();

Is it - in your opinion - useful to do this (in order to achieve the 100%) ?

Cheers, Felix

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lathonez/clicker/issues/242, or mute the thread https://github.com/notifications/unsubscribe-auth/AG5tSIgMJ3ROYj1T8iIiBFBzcCcEdAuWks5rzLIlgaJpZM4NGPrm .

lathonez commented 7 years ago

Hey Felix,

More coverage is obviously better, but I wouldn't break my back to achieve 100% if something was, somehow, untestable.

That being said, if you have a PR to increase coverage here it would be very welcome.

Cheers.

(Sorry I managed to send this early by accident)

On Tue, 25 Apr 2017 at 11:02, Stephen Hazleton shazleto@gmail.com wrote:

Hey Felix,

More coverage is obviously better, but I wouldn't break my back to achieve 100% if something was, somehow, untestable.

That *** On Tue, 25 Apr 2017 at 00:31, Felix Wittmann notifications@github.com wrote:

Hi Stephen,

quick question: do you subscribe to the 100% coverage mantra (as promulgated by e.g. Eran Hammer)?

I suppose the answer is no, since the tests in this project are close to 100%, but not exactly 100%.

Further Remarks: I have noticed that e.g. the ionic specific command ionViewDidLoad is not triggered automatically by the component compilation in the unit tests. I am surprised it is not triggered automatically, do you agree?

It can be done through e.g.

fixture.componentInstance.ionViewDidLoad();

Is it - in your opinion - useful to do this (in order to achieve the 100%) ?

Cheers, Felix

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lathonez/clicker/issues/242, or mute the thread https://github.com/notifications/unsubscribe-auth/AG5tSIgMJ3ROYj1T8iIiBFBzcCcEdAuWks5rzLIlgaJpZM4NGPrm .

lathonez commented 7 years ago

Closed in #243