Testing a Next.js App with React Testing Library & Jest
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 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.