The main decisions you will need to make
1. What style do you want to write your tests in ?
- QUnit(TDD) qunitjs.com
- Jasmine(BDD) pivotal.github.io/jasmine
- Mocha (TDD or BDD). visionmedia.github.io/mocha
3. Which test runner or runners you want to use. The options are:
Outside of Visual Studio:
Within Visual Studio
- Visual Studio Extension: Chutzpah
- Visual Studio Extension: KarmaVs. (Also requires Node.js)
- ReSharper 6
My choice is to use a combination of Chutzpah and Browser.
Browser Test Runner
This is the simplest choice, and can be debugged in visual studio, but requires an HTML file for each test / suite of tests.
Visual Studio Extension - Chutzpah< p> Chutzpah is a visual studio extension which contains 3 of the most popular testing frameworks (Mocha, Quit, Jasmine). It runs and displays your tests in the test explorer.
The major drawback is that you can't debug tests.
In Visual studio 2012/2013: Tools->Extensions and Updates -> Online -> Search for 'Chutzpah'. Install:
•Chutzpah Test Runner Context Menu Extension
•Chutzpah Test Adaptor for the Test Explorer
Optionally add a Chutzpah.json file, amend to indicate your chosen framework.
Chutzpah.json Settings File
"TypeScriptCodeGenTarget" : "ES5",