Learn the smart, efficient way to test any JavaScript application.
YOUR ESSENTIAL GUIDE TO FLAWLESS TESTING
byKent C. Dodds
Why bother testing your JavaScript?
When a user encounters a bug they look like this: đ¤Ź
Bugs grind work to a halt.
Bugs cause financial harm.
Every single time a bug is encountered, user trust erodes.
Bugs are bad.
And who gets blamed?
You.
The developer.
You know you should squash bugs before your code is deployed.
You know you need to ship code that:
Takes every opportunity to guarantee that it works.
Doesnât punish users with unnecessary bugs.
Doesnât play whack-a-mole with features, fixing one thing only to break
another.
Is maintainable and understandable to your co-workers.
A professional ships working code. Code that works.
Weâre talking about code that is well tested. Only through testing can you confidently deliver confident, professional code.
Why arenât you testing code that users rely on?
When code fails on your users, have you failed to do your job?
You should do your job as well as possible and test, right?
Right.
Just one problem...
âTesting takes too much time and effort.â
Thereâs no time. Youâre busy already.
Thereâs no obvious ROI. You canât get the buy-in or budget for testing efforts.
Thereâs no way to test everything. Most testing is click click clicking around every turn of your application. It takes forever and feels like a waste of timeâtime you want to spend shipping new features, not QAing.
Nobody has time for that. But one way or another, your application will be tested. If not by you, then by your users.
Cross your fingers and push to prod.
So... click click click hope for the best? Thatâs what weâre doing?
If we want to ship high-quality, well-tested JavaScript applications there has to be a better way.
Imagine outsourcing the heavy lifting of testing your application.
You're a developer.
You know humans are bad at complex, repetitive tasks.
You also know that computers are very, very good at complex, repetitive tasks.
Professional developers use computers to automate testing of critical paths, behaviors, and all the little thingsâover and over and over again, all day and all night.
Thatâs how professional developers get things done... and done well.
Automated tests are the pro move.
Automated tests are your backup, your muscle.
Automated tests are your secret weapon...
But before you can build those tests, you need to know:
What should I test?
When do I test it?
Do I need 100% coverage?
How many tests are enough?
You could scour the internet to find the right alchemy of testing tools and techniques â or you could skip the analysis paralysis and go right to application success with a proven testing method.
By using this proven testing method, youâll layer these techniques:
Use a static type system and a linter to capture basic errors like typos
and syntax.
Write effective unit tests that target the critical behavior and
functionality of your application.
Develop integration tests to audit your application holistically and
make sure everything works together correctly in harmony.
Create end-to-end (e2e) functional tests for automated click-testing of
critical paths instead of relying on your users to do it for you.
These four layers of automated testing give you the playbook to ship professional JavaScript applications with confidence, speed, and money savings. Every time.
One professional method of testing every JavaScript application
This course will apply the four-layer testing method to a React application, but this foundational strategy can be applied across any JavaScript framework: Angular, Vue, legacy Backbone apps, even frameworks and libraries we havenât met yet.
Following this course, youâll be equipped to:
deliver solid features that work for users as expected
choose the best tools for the job
communicate more effectively with your coworkers
be a more confident, professional JavaScript developer
Learn the professional method for JavaScript testing and always ship high quality software like the professional you are.
Do you know what a testing framework does? Do you know what makes a testing framework different from a testing or assertion library? The best way to use a tool effectively is to understand how it works. And the best way to understand how a tool works is by making it yourself!
In this short course, weâll learn how testing frameworks and assertion libraries work by building our own, simple version of each.
When running unit tests, you donât want to actually make network requests or charge real credit cards. That could⌠get expensive⌠and also very, very slow. So instead of running your code exactly as it would run in production, you can modify how some of your JavaScript modules and functions work during tests to avoid test unreliability (flakiness) and improve the speed of your tests. This kind of modification can come in the form of stubs, mocks, or generally: âtest doubles.â
There are some great libraries and abstractions for mocking your JavaScript modules during tests. The Jest testing framework has great mocking capabilities built-in for functions as well as entire modules. To really understand how things are working though, letâs implement some of these features ourselves.
There are a ton of ways your application can break. One of the most common sources of bugs is related to typos and incorrect types. Passing a string to a function that expects a number, or falling prey to a common typo in a logical statement are silly mistakes that should never be made, but this happens all the time.
We could write a comprehensive suite of automated tests for our entire codebase to make certain mistakes like this never happen, but that would likely be too much work and slow development down to be worth the benefit. Luckily for us, there are tools like ESLint, TypeScript, Prettier, and more which we can use to satisfy a whole category of testing with a great developer experience.
The person using your application components shouldnât have to know or care what framework(s) you used to write your application. Guess what: Neither should your tests.
This course explores the dom-testing-library using 11 different frameworks, from React to Svelte. Youâll get hands-on experience writing tests for any JavaScript framework, giving you the confidence you need to ship your JavaScript application with your framework of choice.
Configure Jest for Testing JavaScript Applications
Jest is a fully featured testing framework with a developer experience that is second to none. Itâs remarkably simple and flexible at the same time. For simple use cases, you often donât need to configure anything, install and enjoy the built-in coverage and watch mode support.
In a real-world application though, youâll often have needs specific to your application, especially when testing browser-based applications. You'll need to handle Webpack loaders, dynamic imports, and custom module resolution which Node.js does not support.
In this course weâll go over ways you can optimize your Jest configuration to make testing real-world JavaScript applications a delight. Weâll cover whatâs already been mentioned in addition to Babel support, code coverage, how to make watch mode even more helpful, and how to run test suites with entirely different configurations.
Test React Components with Jest and React Testing Library
If you want to ship your applications with confidence - and of course you do - you need an excellent suite of automated tests to make absolutely sure that when changes reach your users, nothing gets broken. To get this confidence, your tests need to realistically mimic how users actually use your React components. Otherwise, tests could pass when the application is broken in the real world.
In this course, weâll write a series of render methods and run a range of tests to see how we can get the confidence weâre looking for, without giving up maintainability or test run-speed.
Install, Configure, and Script Cypress for JavaScript Web Applications
Cypress is an incredibly powerful web testing tool. Itâs capable of testing any web application. Its architecture places it a cut above similar end-to-end testing tools. Its developer experience is best-in-class. And because Cypress runs your tests in the same context as the rest of your application, youâre able to get speed, reliability, and debuggability that are just a long - distant dream with similar tools. The catch? There is no catch. Cypress is exceptional.
In this course, weâll go over how you can install, configure, and script Cypress to test modern, real - world JavaScript web applications.
Backends hold so much of our application's business logic that is often used to support multiple clients (web, mobile, and other native platforms). This logic is critical to get right and deploying a breaking change to this can be devastating to your company's goals (not to mention the bottom-line). Increasing your "deployment confidence" is crucial and automated testing is the best way to do that.
As Node.js continues to grow in usage around the world, learning how to test this mission-critical code in a way that increases developer velocity as well as confidence becomes increasingly important. In this workshop we use an Express.js example and focus on the patterns and practices that you need to learn so you can apply what you learn to test your code written in any Node.js web framework.
You'll learn:
Testing Pure Functions
Testing Middleware
Testing Controllers
Testing API routes
Mocking third party dependencies
Testing authenticated code
Gain insight from industry experts.
Exclusive Pro Testing Bonus Content
Interviews
Practical testing with Wes Bos and Scott Tolinski
Wes is a full stack web developer and designer from Hamilton, Canada. He loves to share what he knows through his training products, teaching and speaking at conferences.
Scott Tolinski is the creator of Level Up Tutorials where he has released thousands of free and premium web development tutorials. Scott also is the co-host of the popular web development podcast Syntax. In his free time Scott is a dedicated Bboy (breakdancer) & enjoys pushing himself athletically through dance, working out and snowboarding.
a11y with Marcy Sutton
Marcy is a Senior Front-End Engineer at Deque Systems, where she works on the axe-core team focusing on accessibility test integrations into web developer tooling.
Static Types with Jessica Kerr
Symmathecist, developer, speaker, mother, crazy nut. Atomist. Learning and growing.
Testing Practices with J.B. Rainsberger
J. B. Rainsberger teaches programmers to write software with less stress. Testing plays a significant role in stress reduction. He writes, teaches, speaks, and coaches not only programmers and organizations, but also his fellow coaches.
Visual regression testing with Angie Jones
Angie Jones is a Senior Developer Advocate who specializes in test automation strategies and techniques. She shares her wealth of knowledge by speaking and teaching at software conferences all over the world.
Snapshots and Reason with Jared Forsyth
Jared is a mobile & web developer for Khan Academy, heâs working to bring a world-class education to everyone.
Testing culture with Justin Searls
Occasional conference talk speedrunner. Salt mining instructor at @testdouble.
Ministry of testing with Rosie Sherry
Rosie is a founder of Software Testing Club, she loves all things communities, bootstrapping and unschooling.
Craftmanship with Kent Beck
Kent is an Original signer of the Agile Manifesto, Author of the Extreme Programming book series, rediscoverer of Test-Driven Development, and inspiring Keynote Speaker.
Testing Levels with Mattias Johansson
Mattias is a software engineer working on technology-assisted mental health treatment at Mindler.se and the creator of the programming show Fun Fun Function on YouTube.
Printables
The Essential Testing Glossary
Full Annotated Transcripts
JavaScript Testing Poster
Testing Checklist
Hi, I'm Kent C. Dodds, the creator of this course.
I'm a full-stack JavaScript engineer. At PayPal I helped build products shipped to millions of users all over the globe. I represented PayPal on the TC39. I'm a Google Developer Expert and I've been teaching on egghead.io and Frontend Masters for years. I'm happily married and the father of four kids (and one dog). I like my family, code, JavaScript, React, and of course, testing!
Start testing like a pro
Buy once. Forever yours.
Pro Testing
Loading price
Professional Testing is for you if you are ready to commit to building fully tested applications for your users.
Workshops
Fundamentals of Testing in JavaScript
JavaScript Mocking Fundamentals
Static Analysis Testing JavaScript Applications
Use DOM Testing Library to test any JS framework
Test React Components with Jest and React Testing Library
Install, Configure, and Script Cypress for JavaScript Web Applications
Configure Jest for Testing JavaScript Applications
Test Node.js Backends
Expert Interviews
Coming soon
Features
All 8 modules in this course including testing React and other frameworks
Stream & Download
9 bonus video interviews with testing experts
Fully annotated transcripts with inline code and screenshots
Full source code for all modules
Printable testing checklist and cheat sheets
Basic Testing
Loading price
Basic Testing is perfect if you want to learn the basics of testing, but aren't ready to commit to fully testing your applications.
Workshops
Fundamentals of Testing in JavaScript
JavaScript Mocking Fundamentals
Static Analysis Testing JavaScript Applications
Features
3 intro modules
Streaming access
Basic Transcripts
Standard Testing
Loading price
Standard Testing is perfect if you are ready to start testing as a priority for your applications.
Workshops
Install, Configure, and Script Cypress for JavaScript Web Applications
Fundamentals of Testing in JavaScript
JavaScript Mocking Fundamentals
Static Analysis Testing JavaScript Applications
Test React Components with Jest and React Testing Library
Configure Jest for Testing JavaScript Applications
Features
6 testing modules
Streaming access
Basic Transcripts
What other developers are saying
"Kent is a reliable and enthusiastic teacher. His value as a JavaScript community member can't be overstated. He will help you meet your goals as a developer."
Dan Abramov
React Core team member and Co-author of Redux and Create React App
"So I had the privilege of reviewing videos for upcoming testingjavascript.com by Kent C. Dodds - the 17 Cypress.io videos are A-M-A-Z-I-N-G. Clear, immediately useful, full of great tips for end-to-end testing."
Gleb Bahmutov
Vice President of Engineering Cypress.io and Microsoft MVP for OSS
"Whether you're developing an open-source library or shipping an app to production, you need to test your code. Kent's fun and engaging course will transform you into a testing expert, so you can be confident in what you're releasing."
Peggy Rayzis
Engineering manager at Apollo GraphQL
"Kent has amazing videos covering a range of JavaScript topics. Not only does he show how to perform a task, but he also explains why and regularly unpacks what is happening behind the scenes. If you're looking for quick and concise videos, then consider taking his content for a spin!"
Elijah Manor
PluralSight author and Egghead.io Instructor
"Kent does an amazing job of showing how mocking works using Jest, and how to dig deep past the basics, to really understand what's going on. The section on testing fundamentals is great. Kent breaks down the basics of testing, using up-to-date techniques and shows how to build useful utilities no matter what testing framework you're using."
Joe Eames
PluralSight author, testing evangelist, and conference organizer
"There are very few people on the planet who I'd trust more to learn about testing JavaScript applications from than Kent. What makes this course special is Kent is on the forefront of both testing and creating educational content. He's not just an educator creating technical content nor is he an engineer who wanted to teach, he's both and he does both at an extremely high level. I'm confident there's no better place to learn about testing than testingjavascript.com"
Tyler McGinnis
Educator at TylerMcGinnis.com, Google Developer Expert, and Creator of Udacity's React Nanodegree
"Many devs not only don't know how to test React components, but are also unsure of what to test. Kent's clear step-by-test course explains it all in such a way that it'll make you want to immediately go and test your whole app!"
Ben Ilegbodu
Speaker & Principal Frontend Eng at Stitch Fix
"Kent's signature style of teaching where we all discover concepts together by first implementing them and then finding that the more robust solution is a popular library. This makes learnings more relatable and permanent! Also, watch out for the cool little dev tips like how require.cache works. Those were my favorite!"
Pavithra Kodmad
UI Engineer Atlassian
"I've been trying to get better at testing my code for years, but it always ended in futility. Testing the wrong things while bugs still slipped through. This course is what I've been looking for.This course is for any javascript developer that wants to be confident on release day. My Angular apps will leverage these ideas starting today."
Isaac Mann
Senior Angular Engineer for Nrwl and Egghead.io instructor
"When it comes to learning about testing, my time has been most well-spent learning from Kent C. Dodds and his testing courses. He has a natural ability to explain fundamentals of testing in both framework-specific and framework-agnostic ways, using short videos that keep your attention throughout. I highly recommend learning from Kent!"
Natalie Qabazard
Engineer at Slack
"This is the best guide for configuring Jest Iâve found on the web! Kent walks you through everything from npm install to configuring multiple Jest projects and custom runners in a really easy to understand way. Cannot recommend enough!"
Rick Hanlon
Engineer at Facebook and Jest maintainer
"Sometimes testing feels like a religion and I belong to the church of Kent C. Dodds. Tests should help you write better code not feel like you're just writing it twice. Kent's no-frills approach in TestingJavaScript.com will get your application's tests in shape."
Ryan Florence
Creator of react-router and @reach/router, teacher, consultant, and open source developer
FAQ
Will the modules in the course be updated as software changes?
Yes. I plan on maintaining this course! It generally ignores the "implementation details" and sticks to fundamental evergreen approaches for testing your apps, but as things change they will be updated here.
What if I don't like the course?
You're gonna love it, it's extremely valuable useful tools to add to you arsenal, but if you don't there is a 100% 30-day money back guarantee.
Can I buy a lower tier and upgrade later?
Yes you can! Once you purchase the course and login, you'll find a link at the top of the page allowing you to upgrade. (You only pay the difference between your tier and the tier you upgrade to). Note that if you purchased a tier with a regional discount, this regional discount will not be applied to your upgrade.
Is this an egghead.io course?
This course is built on the egghead.io infrastructure, but is not scheduled to be released on egghead.io.
Is this content new, or is it the same as your Frontend Masters workshops?
This is new content recorded exclusively for this course. It is very dense, with a lot more information, and a lot of fantastic bonuses. Youâll like it.
Who is this course for?
This course is for anybody building web applications with JavaScript. It assumes that you know how to use modern JavaScript and have some experience building applications.
If youâve never tested your apps before, this is a great place to start. If you are a seasoned pro delivering well tested applications, this should be a solid review, reference, and will definitely teach you some new patterns and practices.
This course isnât for you if you believe shipping well-tested quality JavaScript apps to your users is a waste of time.
Are there any discounts available?
The best price is the one you see listed on this page. There are no hidden discounts.