Setup Jest, testing-library, and Cypress: Building a microservices-based NodeJS and React app

Опубликовано: 10 Ноябрь 2024
на канале: Lauro Müller
1,703
39

Link to coupons with BIG DISCOUNTS 🤯 :
👉 Mastering Terraform: From Beginner to Expert - https://www.lauromueller.com/courses/...
👉 Mastering GitHub Actions: From Beginner to Expert - https://www.lauromueller.com/courses/...
👉 Write better code: 20 code smells and how to get rid of them - https://www.lauromueller.com/courses/...

Do you want to bring your dev skills to the next level? Then check out the links with BIG DISCOUNTS to my courses on Udemy! Purchasing the courses is a great way to support this channel and the content I produce, while also getting something amazing in return, so head there right now! I am looking forward to seeing you there and receiving your feedback on the course!

The courses also have a 30-day money-back guarantee, so if you are not satisfied with the purchase, you can ask for a refund, no questions asked.

***

Hello everyone! In this video, we continue the setup of our web-client directory by adding testing packages. We integrate Jest, reac-testing-library, and Cypress into our environment, so that we can continue development with a TDD mindset.

❯❯ GitHub repo for the project: https://github.com/lauromueller/unsoc...
❯❯ Git commit for this video: https://github.com/lauromueller/unsoc...

This video is part of a series where we are developing a microservices-based social media application with the main focus on learning the microservices pattern. We are using NodeJS for our backend services, and React for our frontend client.


─ 🎬 VIDEO CHAPTERS AND CONTENT ─
0:00 Introduction
0:32 Agenda for the video
1:50 Merge branch dependency-updates into master
6:35 Install jest and related dependencies
8:15 Install react-testing-library and write first test
11:58 Install Cypress
14:11 Isolate Cypress and Jest environments
21:27 Finalize test scripts in the package.json file
23:35 Include test scripts in the CI checks
27:58 Closing of the video :)

❯❯ https://jestjs.io/
❯❯ https://testing-library.com/docs/reac...
❯❯ https://www.cypress.io/


─ 🖥 CODE SNIPPETS ─
❯❯ Install Jest: npm install --save-dev [email protected] [email protected] @types/[email protected]
❯❯ Install testing-library: npm install --save-dev @testing-library/[email protected]
❯❯ Install Cypress: npm install [email protected] --save-dev
❯❯ Open Cypress: ./node_modules/.bin/cypress open


─ 🎥 OTHER PLAYLISTS IN THE CHANNEL ─
❯❯ Typescript by example: https://bit.ly/typescript-by-example


─ 🌎 ADDITIONAL LINKS ─
❯❯ Want to support this project?   / lauromueller  
❯❯ My LinkedIn profile:   / lauromueller  


─ 📬 SUBSCRIBE TO THE CHANNEL ─
Want to become a better, more skilled developer? Then make sure to subscribe to the channel and keep on challenging yourself with the new concepts we discuss in every video :) I have a lot of ideas for playlists, ranging from an introduction to Typescript to a deep dive on more complex technologies such as Apache Kafka!


─ 🔈 CONTRIBUTE! ─
If there is any topic in development that interests you, make sure to write it down in the comments! I will take into consideration all your suggestions and requests, as well as the popularity of each of them, when deciding which series to record in the future :)