Re:Angular 2 Core
by trumbitta2 on Saturday October 25, 2014 @09:38AM
(#8508169)
TBH, I'm both amazed by the power and simplicity of Angular && mad at how difficult and unpredictable is to unit test services that use promises and/or depend on other services.
[ Parent
| on HN ]
You can fully mock out those services and pass them into the component under test. Those mocks could return an immediately succeeding (or failing) promise for example. Hey presto, no uncertainty or weird promise handling code in your tests.