I had a some time this weekend and was exploring the ways we could improve our javascript unit tests. The one thing I do not really like about angular unit testing is too much boilerplate code. Probably you all know something like this:
|
|
It’s not very exciting. Sure, you could create some level of abstraction above it and reuse it in all your tests, but it’s not so trivial and probably need significant amount of time to implement.
And here is a little utility library ng-describe to help.
There is the trend in last years chasing the high application availability. It’s really rare to see our application working in vacuum, more often it’s using another couple of services its depends on, aggregating and transforming their contents. And sloppiness any of these could really hurt performance of the whole. The last thing you want in this situation is to leave your application waiting for response from slow service and waste the valuable cpus cycles and blocking threads. The Java language try hard to provide us with tools of trade: Fork/Join framework was added to Java 7 and Parallel Stream to Java 8. All of them help us to be more productive working in highly concurrent environment by creating the right level of abstraction that makes our work more easy and less error prone. In this article I’ll try to introduce you the new concept of CompletableFuture in Java 8.