ASHdevelopment / standards

ASH Development Standards
28 stars 13 forks source link

Should all Ember.computed functions and _private methods have unit tests? #141

Closed ASH-Anthony closed 6 years ago

ASH-Anthony commented 6 years ago

I can't think of a reason we should not have them on every instance with 100% branch coverage

ASH-Michael commented 6 years ago

I can't think of a reason either. I agree that all Ember.computed functions and _private methods should have unit tests. Can we really say with certainty that we can get 100% branch coverage in all cases, though?

ASH-Anthony commented 6 years ago

if you're writing good, functional methods, i think it's pretty easy to test test both branches (and cheap insurance for later). i've found computeds to be really simple to test effectively

ASH-Michael commented 6 years ago

i've found computeds to be really simple to test effectively

Totally agree. I'm just trying to think of some edge cases that might make it difficult to get 100% coverage in private functions.

ASH-Michael commented 6 years ago

Do we feel we have enough information to fast track this issue?

ASH-Michael commented 6 years ago

Approved Standard: