One of the most powerful features of SinonJs is the ability to create a fake server. This feature is very useful when unit testing a component that's connected to a server via an API. Fake servers let you write real […]
Writing maintainable code is not easy in any frameworks or libraries. The fact that BackboneJs does not tie your hands makes your work even harder. Therefore, I will give you ten tips on tidying up your Backbone code. While some […]
This is part 5 of the automating testing series with Mocha, Chai and SinonJs. Part 1 and part 2 introduce the Mocha automated testing framework and the Chai assertion library. We then learned how to use SinonJs spies and stubs. […]
This series introduces automated testing libraries for Javascript applications with Mocha, Chai and SinonJs. The first part covers the fundamentals of Mocha and Chai. The second part describes how Mocha and Chai can test DOM manipulations and handle asynchronous tests. […]
This is the second part on automated testing with Mocha, ChaiJs and SinonJs. If you have never used Mocha or ChaiJs before, I suggest reading the first part. We will continue where we left off last time. The syntax of […]
Many people claim that unit testing is a necessary condition for refactoring code. It is very hard to reliably refactor code without having good testing coverage. According to the definition of code refactoring, the process results in changes applied on […]
Backbone is one of the least opiniated libraries that help you organize your code. Backbone just gives you models, collections, routers, views, a history object and events. The rest is up to you. This means that if you enjoy typing […]
The below instructions describe how a new Backbone project can be set up. Even though there are automatized solutions to perform all these steps, I find it important to go through these steps at least once. There are many excellent […]