How to mock an npm package with Vitest/Jest

Поділитися
Вставка
  • Опубліковано 11 лис 2024

КОМЕНТАРІ • 16

  • @nikolovlazar
    @nikolovlazar  3 місяці тому +4

    Hope you like this video! I got confused when I tried mocking the nanoid package the first time, so I thought I'd record this so you don't have to spend time figuring it out. Make sure to watch until the end because there are two solutions, not just one (like I mention in the video 😂). Thanks for watching! Don't forget to like and sub if you like content like this 🙏

    • @AHMEDYASSER-up6yx
      @AHMEDYASSER-up6yx 3 місяці тому

      @@nikolovlazar bro your whole channel is phenomenal I discovered from web dev Cody when he suggested the video implementing clean architecture. Thanks

    • @nikolovlazar
      @nikolovlazar  3 місяці тому

      @@AHMEDYASSER-up6yx Thanks!

  • @dylanpalmboom2971
    @dylanpalmboom2971 2 місяці тому

    This helped me a lot, thanks 🙂👍

  • @itachi6352
    @itachi6352 3 місяці тому

    Letss goo, mocking data from queries is the same trouble. Been dealing with jest from the beninging and im only in this field for a year now. Testing is rly important where hundreds of players play on the same field. With tests we controll the behavior and its a legit thing. Happy hacking and salute from Macedonia

    • @itachi6352
      @itachi6352 3 місяці тому

      Ps. Love the setup

  • @SayfSentinel
    @SayfSentinel 3 місяці тому

    Bro, how come I just discovered your channel
    Your setup is leet. I use neovim tmux, only backend tho with typescript and sometime Golang
    Is that keyboard a voyager ? Are you still using qwerty for the vim keybind or using another layout ?
    Keep it up bro, your videos are pur gold

    • @nikolovlazar
      @nikolovlazar  3 місяці тому

      Thank you so much! Honestly I'm looking to get into Go 😅
      The keyboard is the voyager, yes, but I use the "Ugreen" magnetic phone holders to tent it at that angle.
      QWERTY. I tried Colemak last year, but I decided it's not worth it. Qwerty's good enough. Here's my layout: configure.zsa.io/voyager/layouts/4aAyM/latest/0

  • @mhdyousuf3392
    @mhdyousuf3392 3 місяці тому

    Hi Lazar, I have been watching your live on Clean Architecture and i loved it.
    can you create a long video building enterprise level application from scratch?
    a humble request from a subscriber😊

    • @nikolovlazar
      @nikolovlazar  3 місяці тому

      Thanks! I will be releasing a course soon that puts all of my CA learnings into use by building an app. It's not going to necessarily be an enterprise-level app though. I'll keep it simple so the course doesn't end up as long as my streams 😅

  • @AHMEDYASSER-up6yx
    @AHMEDYASSER-up6yx 3 місяці тому

    Please can you make a vitest and react testing library masterclass for Next.js , Iam struggling

    • @nikolovlazar
      @nikolovlazar  3 місяці тому

      In what parts exactly are you struggling?

    • @AHMEDYASSER-up6yx
      @AHMEDYASSER-up6yx 3 місяці тому

      @@nikolovlazar testing in general using vitest and react testing library I tried to learn it and implement it . several times but in vain

    • @AHMEDYASSER-up6yx
      @AHMEDYASSER-up6yx 3 місяці тому

      @@nikolovlazar so please can you make a testing course

    • @nikolovlazar
      @nikolovlazar  3 місяці тому +2

      @@AHMEDYASSER-up6yx I'll have this in mind. It would be cool to work on a "testing best practices" content. Thanks!

    • @muthukumar604
      @muthukumar604 3 місяці тому

      @@nikolovlazar setup process kills me