Jasmine JavaScript Testing

More Information
  • Drive your application development entirely by tests
  • Organize your application code in modules with RequireJS
  • Create a fully-tested jQuery plugin
  • Solve problems and learn best practices for asynchronous testing
  • Use Stubs and Spies to perform quick unit testing
  • Test-drive a BackboneJS application
  • Optimize your JavaScript code to production
  • Master the power of tooling and automation with GruntJS
  • Run your tests on the cloud with Travis-CI

From a little renegade scripting language to the de facto standard platform of today, JavaScript has become a universal language available in the widest range of devices; it is truly the 'write once, run everywhere’ language. However, as JavaScript applications become more complicated, testing and applying sustainable software engineering practices also become mandatory.

Jasmine JavaScript Testing is a practical guide to a more sustainable JavaScript development process. You will learn by example how to drive the development of a web application using tests and best practices.

This book is about becoming a better JavaScript developer. So, throughout the chapters, you will not only learn about writing tests, but also about the best practices for writing software in the JavaScript language. This book is about acknowledging JavaScript as a real platform for application development and leveraging all of its potential. You will also learn about tooling and automation and how to make your life easier and more productive.

You will learn how to create a sustainable codebase with the help of Jasmine. We will take a look at integrated testing (with a backend NodeJS server) and how you can speed this process up by faking AJAX requests. As you progress through the book, you will learn about the challenges of testing an application built on top of a framework and how you can prevent your application from suffering from dependency management hell. Also, since your applications need to get into production, you will learn about optimizing the code to reduce the number of requests the browser needs to make while loading your application.

With this book, you will learn everything you need to know to become a real professional in the ever-demanding JavaScript universe.

  • Learn the power of test-driven development while creating a fully-featured web application
  • Understand the best practices for modularization and code organization while putting your application to scale
  • Leverage the power of frameworks such as BackboneJS and jQuery while maintaining the code quality
  • Automate everything from spec execution to build; leave repetition to the monkeys
Page Count 146
Course Length 4 hours 22 minutes
ISBN 9781782167204
Date Of Publication 25 Aug 2013


Paulo Ragonha

Paulo Ragonha is a software engineer with over 7 years of professional experience. An advocate of the open Web, he is inspired and driven to build compelling experiences on top of this ubiquitous platform.

H e loves to hack, so you will often see him wandering around in conferences or attending hackathons. His most recent professional experiences ranged from DevOps (with Chef and Docker) to moving up the stack with Node.js, Ruby, and Python and all the way toward building single-page applications (mostly with Backbone.js and "ad hoc" solutions).

Passionate about automation, he sees testing as a liberating tool to enjoy the craft of writing code even more. Back in 2013, he wrote the first edition of the book Jasmine JavaScript Testing, Packt Publishing.

Paulo has an amazing wife, who he loves very much. He lives in beautiful Florianópolis, a coastal city in the south of Brazil. He is a casual speaker, a biker, a runner, and a hobbyist photographer.