Back to Browse

Testing a Next.js App with React Testing Library & Jest

37.1K views
Sep 1, 2023
30:29

Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap Testing a Next.js App with React Testing Library & Jest requires writing unit tests and integration tests. We will look at unit testing vs integration testing and how to do both in Next.js with React Testing Library and Jest. ⭐ 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/ πŸ”— Starter Source Code: https://github.com/gitdagray/next-testing-intro πŸ”— Completed Source Code: https://github.com/gitdagray/next-testing-example-app πŸ“Ί "Testing Your Code" playlist: https://www.youtube.com/playlist?list=PL0Zuz27SZ-6NTWVG8eM7Dt43vvzulnIbK Testing a Next.js App with React Testing Library & Jest (00:00) Intro (00:14) Welcome (00:39) Recommended Prerequisites (01:04) Lesson Goals (01:24) Starter Code (02:27) Example App Preview (02:47) Unit vs Integration vs E2E Tests (04:50) Testing Library Query Types (06:06) __tests__ folder organization (06:47) Nav component (07:14) Header component unit tests (08:59) TodoItem component unit tests (14:18) TodoList component unit tests (17:15) AddTodo component unit tests (21:12) App Integration Tests (29:14) Notes about Next.js 13 πŸ“š Tutorial References: πŸ”— Next.js Official Site: https://nextjs.org/ πŸ”— React Testing Library: https://testing-library.com/docs/react-testing-library/intro πŸ”— Jest: https://jestjs.io/ πŸ”— TypeScript: https://www.typescriptlang.org/ Was this tutorial about Testing a Next.js app with Jest and React Testing Library helpful? If so, please share. Let me know your thoughts in the comments. #nextjs #app #testing

Download

1 formats

Video Formats

360pmp447.8 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Testing a Next.js App with React Testing Library & Jest | NatokHD