TanStack Query | React Query Tutorial: useQuery unit test | Part 6

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

КОМЕНТАРІ • 5

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

    This is great! I'm completely new to unit testing and this is a great headstart for me.
    I hope you wouldn't mind creating a tutorial on unit testing for beginners or you could point me towards a resource you found helpful?

    • @codingwithlulu
      @codingwithlulu  2 місяці тому +1

      I got a unit test playlist which is for beginner, and planing to create future one with all latest techs.

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

      @@codingwithlulu Wow! Just saw that now. Thanks so much for putting in the effort. I've turned on notifications for this channel for quick update on your latest releases.

  • @AliAbdulRahman-ke4cn
    @AliAbdulRahman-ke4cn 5 місяців тому +1

    Great video! I'm currently working on a project where I have multiple useQuery calls in my component, each fetching different data. I'm wondering how to properly mock these multiple useQuery calls in my unit tests. Could you please provide some guidance on how to handle this scenario? Thanks!

    • @codingwithlulu
      @codingwithlulu  5 місяців тому

      For multiple usequery calls, it is the same way too. If you see the mock, is just to mock result and from which api, we don't define in tests. So you just need add multiple mock results as you need. If this still does not work, please share an example of your scenario and will be able provide exact solution. HAPPY CODING 😊