
In this video I introduce myself and the concepts of unit testing and Test Driven Development.
In this lecture we'll go over what unit testing is and why it's so important to the software development process.
In this lecture we'll go over what Test Driven Development is, a little bit of it's history, it's benefits, and it's work flow.
In this lecture I'll show you a short example Test Driven Development coding session using Mocha and implementing the Fizz Buzz Code Kata.
In this lecture we'll walk through setting up your NodeJS project and installing the Mocha and Chai unit testing libraries.
In this lecture I'll show you how to setup a test runner for Mocha in the Webstorm IDE.
In this lecture I'll walk through setting up a Mocha Test Runner extension in Visual Studio Code.
In this lecture I'll show you how to run Mocha from the command line for when you're not using an IDE with support for Mocha.
In this lecture I'll go over what the Mocha and Chai frameworks are and some of their major features.
In this lecture I'll go over the different ways that Mocha discovers and executes your unit tests.
In this lecture we'll go over Mocha's support for creating suites of tests.
In this lecture I'll go over Mocha's API for creating test setup and teardown functions.
In this lecture we'll learn about creating assert statements in our unit tests using Chai.
In this lecture we'll go over Mocha's support for unit testing your asynchronous code.
In this lecture I'll go over the Supermarket Checkout Kata which will be the focus of this section.
In this lecture I create a new project for this kata and verify I have Mocha and Chai setup correctly. Then I implement the first test case.
In this lecture I'll implement the 2nd, 3rd, and 4th test cases for the supermarket checkout kata. Adding item prices, adding items, and calculating the total.
In this lecture I implement the next test case for the supermarket checkout kata where I add multiple items to the checkout list and validate I have the correct total.
In this lecture I add discount rules and applying discounts when calculating the total.
In this lecture I implement the last test case of the supermarket checkout kata. Generating an exception if an item is added which doesn't have a price defined.
In this lecture I go over what test doubles are and how they help you test your production code in isolation. Then I'll go over how to use the Sinon mocking framework for easily implementing test doubles in your tests.
In this lecture I'll work through a hands on TDD coding session with Sinon for implementing and using test doubles.
In this lecture I'll go over some unit testing and TDD best practices that I've found essential to getting the full benefit of practicing TDD.
In this lecture I'll go over what code coverage is, the different types, and introduce Istanbul the javascript code coverage plugin.
In this lecture we'll walk through a simple example of using Istanbul to produce code coverage results for production code in the Webstorm IDE.
In this lecture I wrap up the course by reviewing what we went over in the course and what the next steps are in the path of learning unit testing and Test Driven Development in NodeJS
Test Driven Development is a key discipline every software developer should practice to ensure the quality of their code. In this course I'll show you how to use this discipline in your everyday coding practices to help ensure the quality of your code base.
In this course we’ll be going over:
What is Unit Testing and Test Driven Development and how does it help you.
What are the Mocha and Chai testing libraries and how are they used for writing unit tests in NodeJS.
How to setup some common NodeJS development environments to use Mocha and Chai.
What are Test Doubles and how do you implement and use them with Sinon.
What are some Best Practices for unit testing and Test Driven Development.
We’ll also walk through some hands on example programming sessions using TDD in NodeJS.