Sascha Depold & Parinaz Roghany
Test Driven Development with JavaScript
#1about 5 minutes
The fundamentals of software testing
Learn the difference between manual and automated testing, the various types like unit and integration, and why testing is crucial for product health.
#2about 2 minutes
Understanding the Test-Driven Development (TDD) workflow
TDD involves converting feature specifications into machine-readable tests before writing any implementation code.
#3about 3 minutes
Choosing the right JavaScript testing tools
An overview of the JavaScript testing ecosystem compares the all-in-one Jest framework with the combination of Mocha and Chai.
#4about 10 minutes
Preparing to implement the Fibonacci sequence with TDD
The Fibonacci sequence is introduced as the coding challenge, and the Red-Green-Refactor strategy is outlined for its implementation.
#5about 17 minutes
Live coding: Writing the Fibonacci unit tests
A step-by-step guide to writing unit tests for the Fibonacci function using Mocha's `describe` and `it` blocks and Chai's `expect` assertions.
#6about 10 minutes
Live coding: Implementing the function to pass tests
The Fibonacci function is implemented incrementally, running the test suite after each change to watch the tests turn from red to green.
#7about 3 minutes
Addressing performance issues with large numbers
An explanation of why the recursive implementation is slow for large inputs and how to solve precision issues using JavaScript's `BigInt`.
#8about 10 minutes
Applying TDD principles to API testing
The workshop transitions from unit testing to integration testing by setting up an Express.js API and using SuperTest to define its behavior via tests.
#9about 14 minutes
Writing API tests and handling external dependencies
Learn to write API tests with SuperTest and discover why making real network requests to external services makes your test suite slow and unreliable.
#10about 14 minutes
Mocking dependencies with Sinon and Nock
Use Sinon.js to mock modules and Nock.js to mock HTTP requests, effectively isolating your tests and making them significantly faster.
#11about 13 minutes
Recap and practical advice for testing applications
A summary of key takeaways, including a discussion on what to test in frontend applications and how to introduce TDD to junior developers.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
04:55 MIN
Introducing the core principles of test-driven development
Breaking the Bug Cycle: TDD for the Win
01:10 MIN
Why developers avoid unit testing JavaScript
Yes, You Need to Unit Test your JavaScript. Here's How.
08:37 MIN
Understanding the Test-Driven Development workflow
Yes, You Need to Unit Test your JavaScript. Here's How.
09:35 MIN
Understanding the red-green-refactor cycle of TDD
Treat yourself - A tale about dog training and test-driven development
20:41 MIN
Applying the red-green-refactor TDD cycle
Yes, You Need to Unit Test your JavaScript. Here's How.
00:21 MIN
Connecting dog training principles to software testing
Treat yourself - A tale about dog training and test-driven development
34:50 MIN
Live coding a Tic-Tac-Toe game using TDD
Yes, You Need to Unit Test your JavaScript. Here's How.
47:06 MIN
Test-driving the refactoring logic with Mocha
Let's build a VS Code extension for automated refactorings
Featured Partners
Related Videos
Breaking the Bug Cycle: TDD for the Win
Nadeen Hussein
Treat yourself - A tale about dog training and test-driven development
Mirjam Aulbach
10 must-know design patterns for JS Devs
Erick Wendel
How not to test
Golo Roden
The 2025 State of JavaScript Testing
Daniel Afonso
How to TDD in legacy code
Gil Zilberfeld
Yes, You Need to Unit Test your JavaScript. Here's How.
James Bender
TDD for Vue.js Developers
Markus Oberlehner
From learning to earning
Jobs that call for the skills explored in this talk.

Test System and Release Engineer (m/w/d)
AKDB Anstalt für kommunale Datenverarbeitung in Bayern
München, Germany
Intermediate
Senior
JavaScript
Automated Testing

Senior Fullstack Engineer – Angular/.Net (f/m/d)
Apaleo
München, Germany
Remote
€65-85K
Senior
.NET
Angular
JavaScript
+1

Software Engineer
tree-IT GmbH
Bad Neustadt an der Saale, Germany
Remote
€54-80K
Intermediate
Senior
Java
TypeScript
Spring Boot


Lead Fullstack Engineer AI
Hubert Burda Media
München, Germany
€80-95K
Intermediate
React
Python
Vue.js
Langchain
+1
![Senior Software Engineer [TypeScript] (Prisma Postgres)](https://wearedevelopers.imgix.net/company/283ba9dbbab3649de02b9b49e6284fd9/cover/oKWz2s90Z218LE8pFthP.png?w=400&ar=3.55&fit=crop&crop=entropy&auto=compress,format)
Senior Software Engineer [TypeScript] (Prisma Postgres)
Prisma
Remote
Senior
Node.js
TypeScript
PostgreSQL

Lead Full-Stack Engineer
Hubert Burda Media
München, Germany
€80-95K
Intermediate
Senior
React
Vue.js
Node.js
MongoDB
+1

