James Bender
Yes, You Need to Unit Test your JavaScript. Here's How.
#1about 7 minutes
Why developers avoid unit testing JavaScript
Common excuses for not unit testing are addressed by framing tests as a long-term investment that prevents project slowdowns.
#2about 5 minutes
Understanding the Test-Driven Development workflow
TDD inverts the traditional development process by using specifications to write automated tests before writing the implementation code.
#3about 7 minutes
The core characteristics of a good unit test
Effective unit tests are isolated from dependencies, targeted to a single scenario, and repeatable regardless of external factors.
#4about 5 minutes
Applying the red-green-refactor TDD cycle
The core TDD loop involves writing a failing test (red), writing minimal code to pass it (green), and then improving the code's design (refactor).
#5about 2 minutes
Choosing a JavaScript testing framework: Jest vs Jasmine
Jest is recommended over Jasmine primarily for its performance benefits, as it runs tests in a multi-threaded environment.
#6about 8 minutes
Writing your first basic unit test with Jest
A live coding demonstration introduces the basic Jest syntax, including the `test`, `expect`, and `toBe` functions for a simple sum operation.
#7about 14 minutes
Live coding a Tic-Tac-Toe game using TDD
This demonstration builds a simple game engine by following the red-green-refactor cycle and using BDD-style tests with `describe` and `it`.
#8about 2 minutes
Practical next steps for adopting unit testing
Actionable advice for teams includes starting with new features, practicing daily, sharing knowledge, and measuring code coverage.
#9about 9 minutes
Audience Q&A on testing strategies
Questions from the audience are answered, covering topics like integration testing in React, handling front-end tests, and involving product teams.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
01:57 MIN
Why developers often view unit testing as a chore
Test-reduction - Doing more with less
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
03:55 MIN
Writing unit tests for specific accessibility concerns
Accessibility Test Driven Development
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
01:52 MIN
Summary of key trends in modern JavaScript testing
The 2025 State of JavaScript Testing
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
02:56 MIN
Identifying the most common pain points in JavaScript testing
The 2025 State of JavaScript Testing
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
13:29 MIN
Recap and practical advice for testing applications
Test Driven Development with JavaScript
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
10:23 MIN
Reframing common complaints about JavaScript development
How to Stop Choosing JavaScript Frameworks and Start Living
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
16:37 MIN
Q&A on developer tooling and testing best practices
Data Mining Accessibility
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
00:50 MIN
Final thoughts on unit testing as a developer's tool
How Unit Testing Saved My Career
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
Featured Partners
Related Videos
How to TDD in legacy code
Gil Zilberfeld
Test Driven Development with JavaScript
Sascha Depold & Parinaz Roghany
Catching up on the basics you don't really need that much code
Chris Heilmann
10 must-know design patterns for JS Devs
Erick Wendel
How to Stop Choosing JavaScript Frameworks and Start Living
Sasha Shynkevich
The Eventloop in JavaScript - How does it work?
Christian Woerz
Watch Tests Go Brrrr! : Getting Started with Cypress in ReactJS
Anna McDougall
Vuejs and TypeScript- Working Together like Peanut Butter and Jelly
Rob Richardson
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.


JO Media Software Solutions GmBh
Brunn am Gebirge, Austria
Senior
CSS
Angular
JavaScript
TypeScript

Speech Processing Solutions
Vienna, Austria
Intermediate
CSS
HTML
JavaScript
TypeScript

doinstruct Software GmbH
Berlin, Germany
Senior
GIT
JavaScript
TypeScript

Lotum media GmbH
Bad Nauheim, Germany
Senior
Node.js
JavaScript
TypeScript

Schulz.codes GmbH
Darmstadt, Germany
Intermediate
Senior
React
JavaScript
TypeScript


Saby New Compy
Bielefeld, Germany
Intermediate
Java
Kotlin

autoiXpert GmbH & Co. KG
Stuttgart, Germany
Senior
Node.js
Angular
MongoDB
TypeScript