JavaScript Testing

Need help getting started?


Course Resources

Download the Project

Throughout Lesson 2 you'll be using the Jasmine testing framework to start developing an address book application. You should download the repository associated with this course or clone it from the following URL:

Additional Reading

Downloadable Materials

You can download Supplemental Materials, Lesson Videos and Transcripts from Downloadables (bottom right corner of the Classroom) or from the Dashboard (first option on the navigation bar on the left hand side).



This course consists of 2 lessons. In the first lesson, you'll discover the importance of testing and reconsider its purpose and the value it provides. In the second lesson, you'll explore the Jasmine testing framework write your own test suites while developing an address book application.

Lesson 1: Rethinking Testing

From education to aerospace, tests provide invaluable feedback to those that analyze the results. In this lesson, you'll learn all about the importance of testing, how to identify the expectations a test is attempting to validate and how to write expectations in code.

Topics covered:

  • What is a test?
  • Validating opinions
  • Identifying and defining expectations
  • Writing expectations in code

Lesson 2: Writing Test Suites

JavaScript doesn't support testing natively, so you'll need a framework to provide the functionality you need. In this lesson, you'll get an introductions to the Jasmine testing framework and use the red-green-refactor workflow to begin development on an address book application.

Topics covered:

  • Introduction to Jasmine
  • Writing suites, specs and tests
  • The red-green-refactor workflow cycle
  • Testing asynchronous functionality