Test Driven Development using Javascript and Jest
3.4 (34 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,931 students enrolled

Test Driven Development using Javascript and Jest

Learn how to use TDD to become a better problem solver
3.4 (34 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,931 students enrolled
Created by Mark Robson
Last updated 3/2020
English
English [Auto]
Current price: $20.99 Original price: $29.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 1.5 hours on-demand video
  • 1 article
  • 6 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Test driven development using Javascript and Jest
  • Jest testing framework
  • Game of Life algorithm
  • TDD fundamentals
  • Javascript TDD
  • How to write Unit Tests
Requirements
  • Nodejs installed
  • An IDE such as VSCode
Description

Heard about Test Driven Development (TDD) and not sure what it is? We'll take a real world example of a coding challenge for a job and work through it using TDD. Learn what unit tests are and how they help to break down a problem.

We'll be building a 'Game of Life' simulation writing unit tests first (using Jest), breaking tasks down into small achievable steps and finishing with interacting with the game in a browser.

Learn the essentials of unit tests and TDD for the real world as you follow along.

We won't be using React or any frameworks - only vanilla javascript.

Who this course is for:
  • Beginner to intermediate programmers
Course content
Expand all 16 lectures 01:27:39
+ Introduction
4 lectures 28:05
Definitions
00:56
The TDD Process Demonstration
10:12
The Test Driven Development Process
2 questions

In this section we'll cover what to name your test files and where to put them. We'll cover the elements of tests including: describe, test/it, beforeAll, afterAll, beforeEach, afterEach, skipping tests and only running one test using 'only'. After this you will know how to set up your tests and make assertions.

Preview 11:19
+ Game of Life algorithm
4 lectures 28:01
The Game of Life algorithm
06:42
The generate function
02:49

In this section we will begin writing a function that counts the neighbours of the current cell in the grid

The countNeighbours function part 1
11:56
The countNeighbours function part 2
06:34
+ Game of Life in the browser
6 lectures 28:37
The drawGrid function
09:07
The attachGridEventHandler function
08:15
The getCellsFromDom function
04:24
The start function
04:43
The stop function
01:03
Integration with the browser
01:05