(no title)
dmatteo | 10 years ago
We use test-automation for real browser testing but prefer to rely on quick and functional unit-testing, thus the choice to go with jsdom.
Regarding the community, you're right, there's a `karma-something` for every need. However, mocha is pretty popular too, and getting momentum by the day. Also the fact that it simply runs on Node makes it quite easy to obtain what you want without extra plugins (e.g. coverage).
EvanPlaice|10 years ago
Click bait adds no value to the discussion.
There's no either/or when it comes to karma/mocha. As the commenters above mentioned, it's best to use both. Mocha for quick unit testing, karma for in-browser testing.
In-browser testing can be automated to run on a wide range of browsers and platforms using integration tools such as Browser Stack.
By faking the DOM, you remove nerf the greatest advantage of client-side integration testing. Checking functionality under realistic circumstances.