Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Unit testing your Javascript with jasmine
Rating: 4.4 out of 5(1,207 ratings)
7,094 students

Unit testing your Javascript with jasmine

Learn how to unit test your JavaScript using the jasmine framework, from your first test to continuous integration.
Last updated 11/2020
English

What you'll learn

  • Write clean suites, specs and expectations.
  • Isolate dependencies on units through test doubles (spies).
  • Automate test runs through continuous integration from version control using a headless browser and a test runner.
  • Set up jasmine as their unit testing framework from scratch.
  • Configure setup and teardown for suites.
  • Understand how matchers work in Jasmine.
  • Write custom matchers and include them in your project.
  • Consume third party matchers.
  • Test asynchronous code.
  • Run unit tests both from a web browser and from a terminal through a test runner.
  • Generate code coverage reports.
  • Improve dependency management through a package manager.

Course content

8 sections86 lectures5h 49m total length
  • Course overview5:57

    Here we explore the full course outline.

  • Why unit testing? why jasmine?7:03

    Here we explore the importance of unit testing and why Jasmine as your testing framework is a great choice.

  • Important javascript notes!2:13

    Learn the course’s JavaScript styles: use const and let (ES6) for variables, compare arrow and anonymous functions, and preview async/await (ES2017) for Jasmine testing.

  • Download exercise files0:37
  • Creating your first test8:04

    Here we write our first spec using jasmine, from scratch!

  • Section summary2:22

    Recap of what we learned in this section.

  • Section notes0:02

    Downloadable materials for this section.

Requirements

  • Basic familiarity with HTML, JavaScript (and basic CSS for an optional lecture)
  • NO knowledge of Jasmine or unit testing is required.

Description

Jasmine is a behavior-driven development framework for testing JavaScript code. It does not depend on any other JavaScript frameworks. It does not require a Document Object Model (DOM), and it has a clean, obvious syntax so that you can easily write tests.


If you want to stand out as a JavaScript developer, you need to learn how to unit test your code. Jasmine is a great way to do so.


By the end of watching this course, you'll be able to:

  • Understand what unit testing is and why it is important in today's market.

  • Set up jasmine from scratch.

  • Write clean and concise suites, specs, and specifications.

  • Understand and use all of the out-of-the-box jasmine matchers, create your custom ones, and include them in your project.

  • Isolate dependencies through test-doubles, known as spies in Jasmine, for true unit testing.

  • Unit test asynchronous code.

  • Setup test reports and continuous integration from version control to automate your test runs.

  • Apply best practices when structuring your tests.


With this course, you'll get downloadable source code, slides, and section notes.


PREREQUISITES

This is a beginner and intermediate course.

No previous unit testing experience is needed, just basic familiarity with JavaScript, HTML, and CSS (just optional when building our course project).

You don't need previous experience with a testing framework at all. We've got you covered!

---

Promo video music license:

Adventures by A Himitsu - Creative Commons — Attribution 3.0 Unported— CC BY 3.0   Music released by Argofox - Music provided by Audio Library   

Who this course is for:

  • Beginner and intermediate front-end developers new to unit testing.
  • Developers who want to improve theirs skills and take their careers to the next levels.
  • Front-end developers who want to learn how to unit test their Javascript.
  • Front-end developers who are familiar with unit testing with other frameworks but want to learn how to unit test with jasmine.
  • Developers with knowledge on other javascript unit testing frameworks but new to jasmine.