Getting Your TFS Builds To Run Your Jasmine JavaScript Unit Tests
A month or so ago I was setting up an automated build and deployment using TFS 2013. I set my build up to run my unit tests, and to consider the build a failure if they didn't pass. If the build fails (either due to compilation failure or unit test failure), the deployment step shouldn't take place. The application in question uses Angular.js and I've written a good number of unit tests to test my Angular controllers, services, etc. For these tests, I used Jasmine (instead of Karma, which is the most often recommended test framework for Angular -- long story). In Visual Studio, I make use of the awesome Chutzpah extension to allow my Jasmine unit tests to be integrated into the Test Explorer right-click context menu just like my MSTest unit tests of .NET code. But how to get these to run as part of my automated build from TFS? It took a little digging, but thanks to an extremely helpful blog post and a little trial-and-error, I found the answer. Here's how: 1. Add