• Post category:StudyBullet-7
  • Reading time:3 mins read


A practical exercise to practice TDD using Node Typescript and Jest

What you will learn

Introduction to TDD using Node and Typescript

Jest testing framework

Practice TDD with exercises (katas)

Inside-out approach a.k.a. classicist a.k.a. Chicago school TDD

Outside-in approach a.k.a. mockist a.k.a. London school TDD

Test doubles, mocks, spies, stubs, fakes and dummies

Description

This is not an actual course, is an exercise showing how to practice Test Driven Development TDD using Node.js Typescript and Jest as a framework library.

How we will work this out is, first, we will present a problem to checkout a list of items and calculate the final price, but we would add some spice on it adding some discounts to some products. Later, we will implement this problem writing the tests first, starting for the simples functionality and growing our design and our functionality until it matches all the requirements provided.


Get Instant Notification of New Courses on our Telegram channel.


While we try to find the solution for this problem, we will remain disciplined staying always within the red-green-refactor loop, that will guarantee that we will make it until our final design assuming no risks, working the solution iteratively and in small increments.

This exercise is a sneak preview of the other courses published about getting to know TDD in Node Typescript and Jest and building a REST API in both approaches Outside-In and Inside-out. Students can decide after watching this “course” if they would like to take any of the other three. Do you want to develop software like this? Check this out and get to know this practice!

English
language

Content

Introduction

Introduction
Kata presentation
Kata implementation
Kata Implementation Split: First Test
Kata Implementation Split: Item Price
Kata Implementation Split: Refactor Items
Kata Implementation Split: Apply Discount
Kata Implementation Split: Refactor Discount