Jasmine JavaScript Testing

Jasmine JavaScript Testing

Paulo Ragonha


If you must take your JavaScript coding to a brand new point of reliability and skillability, this ebook is for you. observe easy methods to use Jasmine for unit trying out while studying top perform for the complete JavaScript universe.

Overview

  • Learn the facility of test-driven improvement whereas making a fully-featured internet application
  • Understand the simplest practices for modularization and code association whereas placing your program to scale
  • Leverage the ability of frameworks akin to BackboneJS and jQuery whereas keeping the code quality
  • Automate every thing from spec execution to construct; depart repetition to the monkeys

In Detail

From a bit renegade scripting language to the de facto common platform of at the present time, JavaScript has turn into a common language on hand within the widest variety of units; it's really the 'write as soon as, run in every single place’ language. besides the fact that, as JavaScript purposes turn into extra advanced, checking out and utilising sustainable software program engineering practices additionally turn into mandatory.

Jasmine JavaScript checking out is a pragmatic consultant to a extra sustainable JavaScript improvement strategy. you are going to study by means of instance the right way to force the advance of an online software utilizing exams and top practices.

This booklet is ready turning into a greater JavaScript developer. So, through the chapters, you won't merely find out about writing exams, but in addition concerning the most sensible practices for writing software program within the JavaScript language. This publication is set acknowledging JavaScript as a true platform for program improvement and leveraging all of its strength. additionally, you will find out about tooling and automation and the way to make your lifestyles more uncomplicated and extra productive.

You will easy methods to create a sustainable codebase with assistance from Jasmine. we'll look at built-in checking out (with a backend NodeJS server) and the way you could pace this approach up by means of faking AJAX requests. As you move in the course of the publication, you are going to find out about the demanding situations of trying out an software outfitted on most sensible of a framework and the way you could hinder your program from being affected by dependency administration hell. additionally, considering that your purposes have to get into construction, you'll know about optimizing the code to minimize the variety of requests the browser must make whereas loading your application.

With this publication, you'll research every little thing you want to comprehend to develop into a true expert within the ever-demanding JavaScript universe.

What you'll examine from this book

  • Drive your software improvement fullyyt through tests
  • Organize your software code in modules with RequireJS
  • Create a fully-tested jQuery plugin
  • Solve difficulties and research most sensible practices for asynchronous testing
  • Use Stubs and Spies to accomplish quickly unit testing
  • Test-drive a BackboneJS application
  • Optimize your JavaScript code to production
  • Master the ability of tooling and automation with GruntJS
  • Run your exams at the cloud with Travis-CI

Approach

The ebook makes use of a concise, to-the-point method of aid builders comprehend and use the ability of Jasmine to create greater and extra maintainable codebases.

Who this publication is written for

This publication is a must have consultant for net builders who're new to the concept that of unit checking out. It’s assumed that you've a easy wisdom of JavaScript and HTML.

Show sample text content

Download sample