Testing is a vital part of any development process. Whether a project's authors are hoping for scalability, fewer bugs, or just code that stands the test of time, a solid test suite is essential.
It's all well and good writing tests, but how do you know that you've tested the code that matters? Did you cover the most important components? Did you test the sad path? The edge cases? What about the zero states?
Using Istanbul, you can generate a nice coverage report to answer these questions. In this article, we'll look at how to get it set up in a typical clientside JS project.
I was working on a Backbone project with fellow Quick Left-er Bob Bonifield recently, when we came across a problem. We were building an administration panel to be used internally by a client, and there were a couple of views that needed to display the same information about users in a slightly different way. To prevent unnecessary AJAX calls, we decided to cache the result of
Backbone.Model#fetch at two levels of our application. The result: less network time and a snappier user experience. Here's how we did it.
Here at Quick Left (Boulder), the office has a single restroom, and like ~30 or so employees. With that, employees were often faced with the harsh reality of making numerous trips to the restroom only to find it occupied, and subsequently needing to walk back to their desks.
As our slogan states, "We turn hard problems into great software", and thus we set out to find a solution to this problem, but of course no ordinary solution would do. We also needed something that would satisfy the inner geek in all of us.
We recently completed a sprint on a big feature set for one of our Angular.js projects: offline mode. The goal was to enable the user to perform as many actions offline as possible, all while maintaining a smooth, reliable experience with no data loss.
This is not a blog post about the general capabilities of offline mode in HTML5, nor a how-to guide for setting up offline mode in your app. (Here is a great resource for that, if that’s what you’re looking for.) This blog post will address the quirks and edge cases that came up in real life development. Hopefully they’ll save you some time with your projects!