MENU

Fun & Interesting

Introduction to Jest Testing | JavaScript Unit Tests

Dave Gray 36,778 2 years ago
Video Not Working? Fix It Now

Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap In this Introduction to Jest testing, you will learn how to write JavaScript Unit Tests and why you should write them. Jest is a popular testing framework that helps you verify your code works like you think it should. 💖 Support me on Patreon ➜ https://patreon.com/davegray ⭐ Become a full-stack web dev with Zero To Mastery Courses: - Complete Next.js Developer: https://bit.ly/CompNextJSDev - Advanced React: https://bit.ly/AdvReactDev - Junior to Senior Dev Roadmap: https://bit.ly/WebDevRoadmap-JrtoSr 🚩 Subscribe ➜ https://bit.ly/3nGHmNn 📬 Course Updates ➜ https://courses.davegray.codes/ ❓ Questions - Please post them to my Discord ➜ https://discord.gg/neKghyefqh ☕ Buy Me A Coffee ➜ https://www.buymeacoffee.com/davegray 👇 Follow Me On Social Media: GitHub: https://github.com/gitdagray Twitter: https://twitter.com/yesdavidgray LinkedIn: https://www.linkedin.com/in/davidagray/ 🔗 Source Code: https://github.com/gitdagray/jest-intro 📺 "Testing Your Code" playlist: https://www.youtube.com/playlist?list=PL0Zuz27SZ-6NTWVG8eM7Dt43vvzulnIbK Introduction to Jest Testing | JavaScript Unit Tests (00:00) Intro (00:10) Welcome (00:32) Lesson Goal (00:51) Why Write Tests? (01:24) Quick Note (01:42) Install Node for npm (02:04) Checking your Node install (02:39) A Simple Function (03:15) Install Jest (04:24) Your First Unit Test (05:42) How to Run Tests (06:41) What is a Unit Test? (07:14) Testing a 2nd Function (12:07) Testing a 3rd Function (16:09) Drilling Down to a Single Responsibility (22:25) Generating a Coverage Report (24:40) Wrap up 📚 Tutorial References: 🔗 Jest Official Website: https://jestjs.io/ 🔗 Node.js & NPM: https://nodejs.org Was this tutorial about writing JavaScript Unit Testing with Jest helpful? If so, please share. Let me know your thoughts in the comments. #jest #testing #javascript

Comment