JavaScript Unit Testing

This book covers the most popular modern JavaScript Unit testing frameworks and gives you a crash course in how to use and automate them. Lots of examples and practical instructions make learning easy and enjoyable.

JavaScript Unit Testing

Hazem Saleh

This book covers the most popular modern JavaScript Unit testing frameworks and gives you a crash course in how to use and automate them. Lots of examples and practical instructions make learning easy and enjoyable.
Mapt Subscription
FREE
$29.99/m after trial
eBook
$10.50
RRP $14.99
Save 29%
Print + eBook
$29.99
RRP $29.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$10.50
$29.99
$29.99p/m after trial
RRP $14.99
RRP $29.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781782160625
Paperback190 pages

Book Description

The largest challenge for many developers’ day to day life is ensuring the support of, and assuring the reach of, their product. With the ever increasing number of mainstream web browsers this is becoming a more difficult task for JavaScript coders.

From the beginning, JavaScript Unit Testing will show you how to reduce the time you spend testing, and automate and ensure efficiency in guaranteeing your success.

JavaScript Unit Testing will introduce and help you master the art of efficiently performing and automating JavaScript Unit tests for your web applications.

Using the most popular JavaScript unit testing frameworks, you will develop, integrate, and automate all the tests you need to ensure the widest reach and success of your web application.

Covering the most popular JavaScript Unit testing frameworks of today, JavaScript Unit Testing is your bible to ensuring the functionality and success of all of your JavaScript and Ajax Web Applications.

Starting with Jasmine, you will also learn about, and use, YUITest, QUnit, and JsTestDriver, integrate them into your projects, and use them together to generate reports.

Learn to automate these tools, make them work for you, and include the power of these tools in your projects from day one.

Table of Contents

Chapter 1: Unit Testing JavaScript Applications
What unit testing is
Why we need unit testing
What Test-Driven Development (TDD) is
Complexities in testing JavaScript applications
Weather forecasting application
Summary
Chapter 2: Jasmine
Configuration
Writing your first Jasmine test
The nested describe blocks
Jasmine matchers
Testing asynchronous (Ajax) JavaScript code
HTML fixtures
Testing the weather application
Summary
Chapter 3: YUI Test
Writing your first YUI test
Assertions
Testing asynchronous (Ajax) JavaScript code
Testing the weather application
Automation and integration with build management tools
Summary
Chapter 4: QUnit
Configuration
Writing your first QUnit test
Assertions
Testing asynchronous (Ajax) JavaScript code
Testing the weather application
Summary
Chapter 5: JsTestDriver
Architecture
Configuration
Writing your first JSTD test
Assertions
Testing asynchronous (Ajax) JavaScript code
Testing the weather application
Integration with other JavaScript test frameworks
Integration with build management tools
Integration with the IDEs
Summary

What You Will Learn

  • Learn and use the power of Jasmine, YUITest, QUnit, and JsTestDriver
  • Learn by doing to synchronously and asynchronously test your JavaScript applications
  • Automate your JavaScript tests using both Build and Integration Management Tools
  • Generate test reports for your JavaScript tests
  • Customize JavaScript unit testing frameworks to include rich test expressions

Authors

Table of Contents

Chapter 1: Unit Testing JavaScript Applications
What unit testing is
Why we need unit testing
What Test-Driven Development (TDD) is
Complexities in testing JavaScript applications
Weather forecasting application
Summary
Chapter 2: Jasmine
Configuration
Writing your first Jasmine test
The nested describe blocks
Jasmine matchers
Testing asynchronous (Ajax) JavaScript code
HTML fixtures
Testing the weather application
Summary
Chapter 3: YUI Test
Writing your first YUI test
Assertions
Testing asynchronous (Ajax) JavaScript code
Testing the weather application
Automation and integration with build management tools
Summary
Chapter 4: QUnit
Configuration
Writing your first QUnit test
Assertions
Testing asynchronous (Ajax) JavaScript code
Testing the weather application
Summary
Chapter 5: JsTestDriver
Architecture
Configuration
Writing your first JSTD test
Assertions
Testing asynchronous (Ajax) JavaScript code
Testing the weather application
Integration with other JavaScript test frameworks
Integration with build management tools
Integration with the IDEs
Summary

Book Details

ISBN 139781782160625
Paperback190 pages
Read More

Read More Reviews

Recommended for You

Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
Responsive Web Design with HTML5 and CSS3 Book Cover
Responsive Web Design with HTML5 and CSS3
$ 23.99
$ 4.80
Object-Oriented JavaScript - Second Edition Book Cover
Object-Oriented JavaScript - Second Edition
$ 29.99
$ 21.00
Mastering Node.js Book Cover
Mastering Node.js
$ 29.99
$ 6.00
Software Testing with Visual Studio Team System 2008 Book Cover
Software Testing with Visual Studio Team System 2008
$ 29.99
$ 21.00
Git: Version Control for Everyone Book Cover
Git: Version Control for Everyone
$ 23.99
$ 16.80