You are previewing Test-Driven JavaScript Development.

Test-Driven JavaScript Development

Cover of Test-Driven JavaScript Development by Christian Johansen Published by Addison-Wesley Professional
O'Reilly logo

Chapter 3. Tools of the Trade

In Chapter 1, Automated Testing, we developed a very simple testCase function, capable of running basic unit tests with test case setup and teardown methods. Although rolling our own test framework is a great exercise, there are many frameworks already available for JavaScript and this chapter explores a few of them.

In this chapter we will take a look at “the tools of the trade”—essential and useful tools to support a test-driven workflow. The most important tool is of course the testing framework, and after an overview of available frameworks, we will spend some time setting up and running JsTestDriver, the testing framework used for most of this book’s example code. In addition to a testing framework, this chapter ...

The best content for your career. Discover unlimited learning on demand for around $1/day.