I attended the San Francisco JavaScript meetup #25 on Tuesday, June 5, 2012. This meetup is presented by Greg Tomei, who discussed developing test-driven web apps. A HTML5 web app uses JavaScript to deal with dynamic data; thus, automated testing of the website offers new engineering challenges. Instead of testing the web interface directly, the web app can be designed in a test-driven approach. The idea is to apply the MVVM (model view view-model) approach to separate end user interface and logic. The logic can then be tested independently of the web user interface. Several technologies are used can be employed, for example:
- Jasmine
- Pivotal 1.2.0 RC 3
- CoffeeScript
- Knockout
- jQuery
- MAMP (Mac Apache MySQL PHP)
This talk presents the test-driven approach using Todoko project as an example. Todoko is a To Do list written in a MVC approach and showcases all the main JavaScript libraries available.