Learning Backbone.js Testing [Video]

Preview in Mapt

Learning Backbone.js Testing [Video]

Jonathan Freeman

An interactive guide to perform automated testing on Backbone.js applications with the help of a real-world example
Mapt Subscription
FREE
$29.99/m after trial
Video
$63.75
RRP $74.99
Save 14%
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
$63.75
$29.99p/m after trial
RRP $74.99
Subscription
Video
Start 30 Day Trial

Frequently bought together


Learning Backbone.js Testing [Video] Book Cover
Learning Backbone.js Testing [Video]
$ 74.99
$ 63.75
Data Analysis with Pandas and Python [Video] Book Cover
Data Analysis with Pandas and Python [Video]
$ 39.99
$ 34.00
Buy 2 for $35.00
Save $79.98
Add to Cart
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
 

Video Details

ISBN 139781785285530
Course Length1 hour and 48 minutes

Video Description

The dynamic nature and flexibility of JavaScript and Backbone.js includes many ways of expressing ideas. Such liberty gives way to certain risks that aren’t as prominent in strongly typed languages and highly opinionated libraries and frameworks. Learning how to mitigate these risks is a crucial step to writing smarter software, and smarter software makes for happy developers!

Learning Backbone.js Testing will bootstrap you into a world of JavaScript testing and provide you with fundamental experience in writing tests. By understanding and becoming comfortable in testing Backbone.js applications, you can increase your productivity, code quality, and design skills.

At the beginning, we’ll discuss different testing philosophies and go over some testing basics. After establishing a motivation for and philosophy of testing, we’re going to dive right into how we express our tests in Jasmine’s BDD syntax. We’ll also hone in on how to deal with the DOM and AJAX in our tests.

Once you learn some syntax and apply it to plain JavaScript and Backbone.js code, we’re going to run into the problem of manual testing practices. We’ll discuss and incorporate a tool that will automate our tests and make testing considerably more streamlined using Karma. From there, you’ll learn to apply testing techniques and tools such as fixtures and spies. This course will jump-start your automated testing experience and you’ll be writing robust tests for everyday objects!

Style and Approach

This course relies heavily on live-coding and practical examples to facilitate the learning process. By the end of the course, we’ll have a partially functional app and a final hands-on challenge to complete and customize the app.

Table of Contents

Getting Started with Testing
The Course Overview
Testing and Why It’s Used
Understanding TDD versus BDD
Investigating Our Toolshed
Understanding Jasmine
Introducing Jasmine
Making Our Way Through the Syntax
Writing a Simple Test
Hands-on Challenge – Adding to Our getNthElement Function
Using Backbone.js in Jasmine Tests
Testing Models
Cooking Up a Model
Testing Instantiation and Defaults
Taking Care of Dietary Restrictions
Introducing Fixtures
Hands-on Challenge – Refactoring to Use Fixtures
Automating the Process
Embracing Laziness
Installing Karma
Running Karma in Browsers
Making Our Tests Work with Karma
Depending on AJAX
Collecting Our Recipes
Hands-on Challenge – Getting All the Variations
Mocking AJAX with Sinon.js
Setting Up a Mock Backend Server
Testing Views
Setting Up Our Views
Templating and DOM Expectations
Rendering Our View
Taking Notes
Hands-on Challenge – Adding Recipes
Testing Routers
Unit Testing Routers
Introducing Spies
Writing Our First Router Test
Hands-on Challenge – Routing Recipe Variations

What You Will Learn

  • Understand the philosophy behind test-driven and behavior-driven development
  • Acquire a handful of tools and helpers to facilitate testing JavaScript applications
  • Overcome the obstacle of testing code that relies on AJAX by using sinon.js
  • Eliminate tedious manual testing habits in favor of streamlined automated workflows by using Karma
  • Develop a solid approach to behavior-driven development with Jasmine that will help you write better tests
  • Build and use fixtures to facilitate predictable data instantiation and reuse
  • Customize and extend the testing framework to bring the tools closer to your problem set

Authors

Screenshots

Table of Contents

Getting Started with Testing
The Course Overview
Testing and Why It’s Used
Understanding TDD versus BDD
Investigating Our Toolshed
Understanding Jasmine
Introducing Jasmine
Making Our Way Through the Syntax
Writing a Simple Test
Hands-on Challenge – Adding to Our getNthElement Function
Using Backbone.js in Jasmine Tests
Testing Models
Cooking Up a Model
Testing Instantiation and Defaults
Taking Care of Dietary Restrictions
Introducing Fixtures
Hands-on Challenge – Refactoring to Use Fixtures
Automating the Process
Embracing Laziness
Installing Karma
Running Karma in Browsers
Making Our Tests Work with Karma
Depending on AJAX
Collecting Our Recipes
Hands-on Challenge – Getting All the Variations
Mocking AJAX with Sinon.js
Setting Up a Mock Backend Server
Testing Views
Setting Up Our Views
Templating and DOM Expectations
Rendering Our View
Taking Notes
Hands-on Challenge – Adding Recipes
Testing Routers
Unit Testing Routers
Introducing Spies
Writing Our First Router Test
Hands-on Challenge – Routing Recipe Variations

Video Details

ISBN 139781785285530
Course Length1 hour and 48 minutes
Read More

Read More Reviews

Recommended for You

Data Analysis with Pandas and Python [Video] Book Cover
Data Analysis with Pandas and Python [Video]
$ 39.99
$ 34.00
C++ Operating on Files [Video] Book Cover
C++ Operating on Files [Video]
$ 53.99
$ 45.90
Industrial Cybersecurity Book Cover
Industrial Cybersecurity
$ 35.99
$ 25.20
OAuth 2.0 Cookbook Book Cover
OAuth 2.0 Cookbook
$ 35.99
$ 25.20
Web Security: Common Vulnerabilities And Their Mitigation [Video] Book Cover
Web Security: Common Vulnerabilities And Their Mitigation [Video]
$ 48.99
$ 41.65
Kali Linux - An Ethical Hacker's Cookbook Book Cover
Kali Linux - An Ethical Hacker's Cookbook
$ 35.99
$ 25.20