Learn Vitest and Testing Library In 40 Minutes @ProgramWithErik
Learn Vitest and Testing Library In 40 Minutes  @ProgramWithErik
Uploaded April 2022 | Updated November 2026, 3 hours ago
πŸ‘‰ Want to win prizes Break the Code 2!? Play for free here - https://go.tech/pwebtc

Vitest is an amazing fast unit-test testing framework for Vue, React, and Svelte. In this video I discuss how to set it up, how to create some tests, and some cool features of it, including in-source testing and mocking responses with msw.

πŸ‘‰Check out my last video on learning to code in 3 months
youtu.be/IoE28DSp2SU

πŸ‘‰ Sign up and get free Vue cheat sheets and updates!
https://www.vuecourse.tech

Need some mentoring, help with a project, get a career in tech, level up your skills? Check it out
πŸ‘‰mentorcruise.com/mentor/erikhanchett


0:00 Introduction
0:54 .Tech Domains
02:42 Why Vitest and Testing LIbrary
05:37 Installing vue latest
06:55 Running our first test
08:30 Creating our View.vue file
11:39 Creating our tests for View.vue
18:58 Creating snapshot testing
21:49 Using .only and .skip and .concurrent
22:20 Vitest run and test coverage support
23:53 Adding mocking with msw
24:38 Adding my-pokemon component for mocking
28:03 Adding mock response to .ts file
29:00 Install msw and whatwg-fetch msw
29:30 Setting up msw (for mocking http responses)
32:05 Creating my-pokemon component test
35:53 Creating in-source testing
39:37 Conclusion

Links
https://vitest.dev/
test-utils.vuejs.org
github.com/ErikCH/Vitest-YT
Learn Vitest and Testing Library In 40 MinutesHow Do You Land A Web Development Job? Interview Github Practice GuideHow To Create A Vue 3 App In 2022 - With Vite, Pinia, Vue Router and more! #ShortsI Try To Recreate Signals In Vue - With Evan Yous Help!3 Must Know Tips For Nuxt.js DevelopersHow To Make A Simple Contact Form Submission With AWS SES With Express And JavaScriptTop 5 Web3 Sites For Developers! Number 5 Will Change Your Life!TanStack Start Is Kind Of A Big Deal...Nuxt Server Components Explained (With New Updates!)!Create A Vue.js 3 Full Stack Application With Amplify, GraphQL, Auth and More! #teamseasLearn To Code In 3 Months Is A ScamThis is Why Your YouTube Channel Isnt Growing...  🀯🀯🀯
Program With Erik |

Learn Vitest and Testing Library In 40 Minutes

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER