by DotNetNerd
20. February 2014 14:13
Since the amount of javascript in an average website has exploded, the need to unittest that code has become apparent. I think we are still a bit behind in this respect, as I often hear from people don’t know what “the right way” is to create such as setup. Sadly this seems to mean that they never got off the ground and skip testing clientside. Without starting any kind of war on this, I think most of us like at least some number of tests and the option to do TDD.
Well I may already have painted myself into a corner, as I don’t claim to know the one and only “right way”, but I have found a way of going about it that I really like and have fun with. Shortly put, I have been playing around with Mocha.js and Should.js – supported by the Chutzpah test-runner and testem that allows a light weight way of running tests while doing TDD.
More...