Recently a fellow developer from Varna, Krasimir Tsonev, posted an article about Unit Testing client-side JavaScript. I have always enjoyed reading articles from fellow Bulgarian developers, but in this particular case, I felt there were a number of problems with the proposed approach. In the following post I am going to point out some of these problems and discuss alternative approaches. I will provide an implementation of the same basic functionality with less code, and then expand on it to illustrate best practices when working with AngularJS.
So, let me first show you a declarative implementation of Krasimir’s form: