Mô tả

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.

Bạn sẽ học được gì

Students will know what unit tests are and how to create them using the practice of Test Driven Development.

Yêu cầu

  • The student should have a beginner understanding of javascript and NodeJS.

Nội dung khoá học

7 sections

Introduction

1 lectures
Introduction
02:22

Overview and Setting Up Your Development Environment

8 lectures
What is Unit Testing?
03:35
What is Test Driven Development
04:37
Quick Example TDD Session - The FizzBuzz Kata
11:35
Installing Mocha and Chai
03:03
Setting Up Mocha Test Runners in Webstorm
03:53
Setting Up Mocha Test Runners in Visual Studio Code
02:26
Running Mocha from the Command Line
02:45
Unit Testing and Test-Driven Development Quiz
5 questions

Exploring Mocha and Chai with Examples

6 lectures
Mocha and Chai Introduction and Overview
01:57
Test Discovery
03:27
Test Suites
03:37
Test Setup and Teardown
06:26
Assert Statements with the Chai Assert Library
04:43
Testing Asynchronous Code
05:25

Hands-On Example - Implementing a Checkout Cart with TDD

6 lectures
Overview
01:33
Setup and First Test Case
02:01
Add Items, Add Item Prices, and Calculate Total
04:38
Add Multiple Items and Calculate Total
02:20
Add and Apply Discounts
10:54
Throw Exception when Adding an Item with No Price
01:48

Isolating Your Unit Tests

3 lectures
Overview of Test Doubles with Mocha
06:51
Sinon Example
08:15
Test Doubles Quiz
5 questions

Best Practices for Unit Testing and TDD

3 lectures
Unit Testing and TDD Best Practices
03:16
Overview of Code Coverage
02:18
Hands On Example of Code Coverage
01:40

Conclusion

1 lectures
Conclusion
02:23

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.