Closed ASH-Anthony closed 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?
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
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.
Do we feel we have enough information to fast track this issue?
Approved Standard:
Ember.computed
properties and _private
functions should be unit tested and have 100% branch coverage.
Why? Unit tests are the most basic test for testing the core functionality of the app and relying on integration and acceptance tests can provide a false sense of code coverage.
I can't think of a reason we should not have them on every instance with 100% branch coverage