Hacker News new | ask | show | jobs
by shadeless 4696 days ago
Thanks for sharing, it's always useful to hear about real-life usage. One thing I didn't hear much regarding Angular/Ember is testing, can you tell us how you approached it?
1 comments

I can't speak for OP but if you look through the Balanced Dashboard repo there are some good examples:

    https://github.com/balanced/balanced-dashboard/blob/master/test/integration/guest_user_flow.js
For the most part we use integration testing e.g. We simulate mouse clicks and key presses via jQuery and then assert changes in the page behaviour and calls made to the API (see line #85 in above link).

If you approach it like that, and I assume this would be the same for Angular, there's very little testing that's specific to the framework you're building on top of.

At Balanced, even when running unit tests on models to test features in isolation we're still not touching anything inside Ember, occasionally we may jump into the internals to short cut getting the app to a particular state but 99.9% of the time you don't need to.