Using Vue Test Utils in Vitest

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ม.ค. 2025

ความคิดเห็น • 40

  • @ragura
    @ragura 2 ปีที่แล้ว +19

    Thanks for the video! An explanation of checking emits and the use of snapshots would be nice 🙂

    • @caiovinicius7871
      @caiovinicius7871 2 ปีที่แล้ว +3

      Agreeeeed, something with mocking an basic API will be very nice too!!

    • @RodrigoLimaBatista
      @RodrigoLimaBatista 2 ปีที่แล้ว +2

      It would be greeeeat. The Kellogg's tiger said so.

    • @LearnVue
      @LearnVue  2 ปีที่แล้ว +2

      ooh thats a great idea!

  • @cindrmon
    @cindrmon 2 ปีที่แล้ว +3

    thanks for the heads up with vue test utils in vitest! this would really help with testing my vite components a lot! would be also interested in seeing integration and e2e testing in vite as well

  • @patrickraedler3656
    @patrickraedler3656 2 ปีที่แล้ว +1

    Vitest + Vue Test Utils are amazing together!

    • @LearnVue
      @LearnVue  2 ปีที่แล้ว

      i agree!

  • @abdelazizabdelioua890
    @abdelazizabdelioua890 2 ปีที่แล้ว

    An underrated channel 🙃

  • @haqzel6476
    @haqzel6476 2 ปีที่แล้ว

    1:07 Have you a video about your way of make directories folder and files in a vue project? I have problems with that

    • @LearnVue
      @LearnVue  2 ปีที่แล้ว +1

      i don't currently, mostly it depends on the type of project but i've been using a lot of the Nuxt folder structure and atomic design patterns for the components!

  • @JadaKingdom971
    @JadaKingdom971 2 ปีที่แล้ว

    Did exactly what's shown in the video yet I'm getting an error that says that vite-node fails to load the .vue file and then the error points towards the first arrow function in the describe method

  • @caiovinicius7871
    @caiovinicius7871 2 ปีที่แล้ว +2

    Ty Man, this will help me a lot soon. Great Job!
    Also, there's a way to support/donate you?

    • @LearnVue
      @LearnVue  2 ปีที่แล้ว +1

      glad it could help. right now, i don't have a Patreon or anything like that, but I am working on something on LearnVue.co to help provide some extra content/learning material that's coming in the next few months :)
      thanks for all the support!

  • @mateusavilaisidoro8305
    @mateusavilaisidoro8305 2 ปีที่แล้ว

    make a serie with small videos about all the things we can test. your videos are amazing

  • @kabakiAntony
    @kabakiAntony 2 ปีที่แล้ว

    Hey thanks for the quick overview just what I needed , kindly do a guide for testing a modular store

  • @JesseGilbride
    @JesseGilbride 10 หลายเดือนก่อน

    Good primer, thanks. All of those expansion ideas at the end get a "yes please" from me. Also, adding Pinia (@pinia/testing). I currently have a hard time - hopefully not for long - what store data (made available in the actual app from an API) should be mocked/created; like how much is just enough, and what can be set as values vs undefined (if that's a thing).

  • @brunoberrehuel4833
    @brunoberrehuel4833 2 ปีที่แล้ว +3

    Great video as usual :-)
    May be some explanation about mocking functions ?

  • @maconic
    @maconic 2 ปีที่แล้ว

    Has anybody got this running with Vuetify? Sadly it does not seem to be able to find its components. "[Vue warn]: Failed to resolve component: v-container"

  • @tanikobas6991
    @tanikobas6991 11 หลายเดือนก่อน

    I appreciate how easy and short this tutorial is. Thanks!
    I'd like to know how I can test each item in items in my component, but with passing props: { items: [{name: "foo", url: "bar"}, ...]
    I want to expect item.name.text === item.name.text in each iteration. I don't know how to get access to the props I passed to my competent if I do a
    wrapper.findAll("a").forEach(link, index) expect link.text.equals(props.items[index].name

  • @alaadq8130
    @alaadq8130 2 ปีที่แล้ว

    thanks for the channel
    can you make video about
    how we implement social share buttons links with popup in efficient light way with vue3

  • @thorwd
    @thorwd 2 ปีที่แล้ว +1

    Wasted about 2 days before realizing I needed to also install happy-dom 😅
    Anything Vitest related would be very helpful, thanks

    • @LearnVue
      @LearnVue  2 ปีที่แล้ว +1

      yup the happy-dom is a game changer!

  • @xxwaldi
    @xxwaldi 2 ปีที่แล้ว +5

    Awesome :) I guess mocking would be a great advanced topic!

    • @LearnVue
      @LearnVue  2 ปีที่แล้ว +3

      oooh alright thats good to know there's more interest!

    • @xxwaldi
      @xxwaldi 2 ปีที่แล้ว +2

      @@LearnVue definitely! I'm actually a tech lead at my company and I share your clips, because I love the simplicity and educational value :D

    • @SpaghettiRealm
      @SpaghettiRealm 2 ปีที่แล้ว

      Yes please

  • @prainlopez2734
    @prainlopez2734 ปีที่แล้ว

    Pretty good content.
    Sigh that even it’s a year later the really vitest combined for component testing content still few😢

  • @quocbao6046
    @quocbao6046 2 ปีที่แล้ว

    Damn, been looking forward to your new video for while. Awesome video as always.
    I wonder if I can ask what extensions you use for Vue (beside Volar ofc). Maybe make a video about it (all thr the VScode tutorials for Vue on YT I found are almost 3 4 years old).
    Anyway, keep it up 👌

    • @LearnVue
      @LearnVue  2 ปีที่แล้ว +1

      besides Volar, most of mine aren't too Vue specific. I use Typescript in some personal projects and the Tailwind VSCode extensions, though!

  • @FranciscoJunior29
    @FranciscoJunior29 2 ปีที่แล้ว

    Very cool, thanks for share with us. Great content.

  • @shamscorner
    @shamscorner 2 ปีที่แล้ว

    I want a full vitest course!

  • @komogortev
    @komogortev 2 ปีที่แล้ว

    how to test injections would be appreciated

  • @yoanestradablanco1608
    @yoanestradablanco1608 ปีที่แล้ว

    greetings crack I have seen a lot of testing-library in the development community for vue it would be good to learn this testing library

  • @yozhis1
    @yozhis1 2 ปีที่แล้ว

    i love how similar this video looks to fireship. i checked the channel name twice

  • @jeezygarceezy
    @jeezygarceezy 2 ปีที่แล้ว

    If u wanna cover slot testing, that would be cool

  • @abdelilahou2822
    @abdelilahou2822 2 ปีที่แล้ว

    Broooo where have u been

    • @LearnVue
      @LearnVue  2 ปีที่แล้ว +1

      got busy the last few weeks 😔

  • @howardlam6181
    @howardlam6181 6 หลายเดือนก่อน

    unfortunately my company's current project frontend code was written by a newbie so a lot of services were imported directly, not as dependency services so I can't supply mock version of those services like authentication in vitest for testing. But I don't have authority to make PR that changes these things. Fuck my life

  • @redobdc
    @redobdc 2 ปีที่แล้ว

    Jajaja a simple unit test 😌

  • @TajAlasfiyaa
    @TajAlasfiyaa 2 ปีที่แล้ว

    *Hello Word bold text*
    Normal text