Your Cart

JavaScript Testing Recipes

On Sale
£19.00
£19.00
Added to cart

JavaScript is everywhere. It’s in your browser, it’s running your servers, we’re even piloting helicopters with it.

So it had better work.

JavaScript Testing Recipes is for anyone looking to improve the quality of the JavaScript they write. It explains how to create applications from modular components that can be easily tested to make sure they work — now, and in the future.

It covers the full spectrum of problem domains we use JavaScript for today, including chapters on programming in the browser, building server-side apps and command-line programs.

In this book, you will learn how to:

  • Master the building blocks of tests: organisation, assertions, mocks, stubs and async
  • When and why to apply integration tests or isolated unit tests
  • Handle events and streams and check their behaviour
  • Build decoupled user interface modules that can be tested individually
  • Test your client’s interaction with a JSON API
  • Integrate WebSockets on the client and server side with end-to-end tests
  • Check your application's URL routing and navigation flows
  • Test code that relies on the current time and the JS timer functions
  • Deal with storing data in the browser and with server-side databases
  • Work with build tools like Browserify and CoffeeScript
  • Run cross-browser tests automatically from the command line
  • Build testable web servers in Node and Express
  • Refactor server-side code to increase modularity and make testing easier
  • Talk to databases using services and ORMs
  • Handle authentication and login sessions during tests
  • Use headless browsers and browser simulators
  • Write command-line applications using unit testing
  • Isolate a program from the Unix environment, standard I/O and exit codes
  • Test programs that rely on third-party HTTP APIs
You will get a ZIP (22MB) file