Learn Javascript Unit Testing With Mocha, Chai and Sinon
4.0 (16 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
66 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Learn Javascript Unit Testing With Mocha, Chai and Sinon to your Wishlist.

Add to Wishlist

Learn Javascript Unit Testing With Mocha, Chai and Sinon

Learn to write unit tests with Mocha Chai and Sinon as well as learning how to TDD the right way
New
4.0 (16 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
66 students enrolled
Created by Tyler Pedley
Last updated 8/2017
English
Current price: $10 Original price: $20 Discount: 50% off
5 hours left at this price!
30-Day Money-Back Guarantee
Includes:
  • 40 mins on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Write unit tests using Mocha, Chai and Sinon
  • Setup a new project that is ready for unit testing
  • Create programs following the TDD (Test Driven Development) patterns
  • Learn how to write more reliable and robust code
  • Learn how to expand your test suites with mocks, stubs and spies
  • Learn the use of spies and when to use them
  • Learn the use of stubs and when to use them
  • Learn the use of mocks and when to use them
View Curriculum
Requirements
  • Basic JavaScript knowledge
  • A computer with an internet connection
Description

In this course you will learn the basics of test driven development and I will show you the best practices for using TDD. You will learn how to use Mocha, Chai and Sinon together to test your Javascript code. After completing this course you will be able to adapt the TDD style using any other testing frameworks for any other language. I will also show you each of the different styles so that you can use the one that you like the best.

Who is the target audience?
  • Anyone looking to learn how to write unit tests for their code
  • Anyone who wants to start writing more reliable and robust code
Compare to Other JavaScript Courses
Curriculum For This Course
+
Introduction
2 Lectures 03:42

In this video I will show you how to test a new node project ready for us to use to create a test suite.

Preview 03:04
+
Introduction To Unit Testing
2 Lectures 09:59

In this video you will learn about Unit Testing and see some examples of real unit tests. You will understand what unit tests are and why they are important

Preview 05:35


A quick quiz to cover the topics in the first section.

Unit Testing Basics
3 questions
+
Mocha
2 Lectures 04:13

A quick introducing to MochaJS to prepare for the next video where we will use Mocha to create a test suite

What is Mocha?
00:47

In this video I take you over the creation of a test suite for a simple calculator app and explain what each part of the suite does. We create a foundation for the following videos

Using Mocha to prepare a test suite
03:26
+
Chai
4 Lectures 07:34

An introduction to Chai and why it is so popular. I give an overview of the library and what it is used for 

What is Chai?
00:55

Chai - Should
02:10

Chai - Expect
02:36

Chai - Assert
01:53
+
Sinon
4 Lectures 14:36
What is Sinon?
01:48

Sinon - Spies
02:44

Sinon - Stubs
04:10

Sinon - Mocks
05:54
+
Conclusion
0 Lectures 00:00

This quiz will test your understanding of Mocha, Chai and Sinon as well as your understanding of best TDD practices.

Unit Testing Quiz
9 questions
About the Instructor
Tyler Pedley
4.0 Average rating
16 Reviews
66 Students
1 Course
Software Engineer

Hi, My name is Tyler Pedley and I am an embedded software developer however I also lead a team of develops for a company working on multiple web / NodeJS projects. I always develop with agile in mind and have a great experience with agile. Mainly my courses will be on agile practices such as TDD/BDD however I also will teach NodeJs, TypeScript and JavaScript