Testing a Next.js App with React Testing Library & Jest

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

КОМЕНТАРІ • 41

  • @diegopalacios68
    @diegopalacios68 Рік тому +7

    Thanks, Dave! I truly appreciate your method of walking us through each pre-existing file rather than writing them from scratch. It's a direct and effective way to learn. Keep up the fantastic work, your teaching style is incredibly helpful!

  • @codernerd7076
    @codernerd7076 Рік тому +6

    It's like we got more Next.js with Dave this week

  • @irinsajan2870
    @irinsajan2870 Рік тому +3

    You helped me build my knowledge in React/Next. And I was struggling to start with react testing and here you are to help me through! Thank you for this series. Expecting more on testing. It would be great if you can also help with E-to-E with Cypress like you mentioned in the video.

  • @user679jk7
    @user679jk7 Місяць тому

    Thank you for making this fantastic video!

  • @froggerabc
    @froggerabc 11 місяців тому

    every so often you come across a vid that hits the nail on the head and gives you exactly what you want. This is one. Thank you!

  • @ryanwoods3333
    @ryanwoods3333 Рік тому +1

    brilliant! very happy to see more unit testing content.

  • @Santon-Motho
    @Santon-Motho Рік тому +2

    Dave Gray, you absolute legend! 😁

  • @SadullaAlisherov-t7o
    @SadullaAlisherov-t7o Рік тому

    explaining is way better than the official docs. Thanks for the video :)

  • @kamal1002
    @kamal1002 Рік тому

    Got this when needed ! 😇
    Thank you Dave Sir !

  • @sushieatingcobra
    @sushieatingcobra 6 місяців тому +1

    thanks

  • @MOJICA7257
    @MOJICA7257 Рік тому +1

    Thanks Dave!
    Cheers 🎉🎉🎉

  • @eshw23
    @eshw23 11 місяців тому

    Thank you save. A tutorial on Cypress testing would be amazing to.

  • @farahrayis5928
    @farahrayis5928 Рік тому

    Great video, looking forward to the next part of your testing series :) Thanks

  • @yuliasereda5671
    @yuliasereda5671 Рік тому

    Thanks, Dave!! You make very profeccional videos as a teacher and as a coder))

  • @DanielMolnar_Tuzla
    @DanielMolnar_Tuzla Рік тому

    I would really like to se more tests with mocking API part, maybe router also. It's something I intend to cover these days in my app. Hope to se more materials soon. Stay well

  • @qitpess2660
    @qitpess2660 Рік тому +1

    21:58 - "When the parent component has 'use client' then all of its children will be client components"
    As the docs say, it's not true. The client component can have server components inside

  • @tonskreee6213
    @tonskreee6213 Рік тому +1

    Great Video. Im wondering if you can also demo on how to test Server components?

  • @ghostnote9714
    @ghostnote9714 10 місяців тому

    Nice video! Quick thought though…
    Aren’t the integration tests showcased at the end enough to cover all use cases of the app?
    Therefore, the unit tests don’t provide any value and it’s just a duplication of tests at that point?

  • @abdullahalsiam105
    @abdullahalsiam105 11 місяців тому

    incredible ! by the way what's your vs code icon theme?

  • @RichReflectionz
    @RichReflectionz Рік тому

    Still need to get into testing, haven't done any since learning how to program as a frontend less than 1 year in, I thought typescript helps keep code safe... but am wrong haha

  • @rolf-s
    @rolf-s Рік тому

    E2E testing with cypress in next.js would be cool! 😊

  • @jco199
    @jco199 11 місяців тому

    Hi Dave, great videos as always. I'm currently going through all of your next.js videos tutorials.
    I've noticed that In the todo notes app previously in next-js-course/next11 it seems that react hooks and states are only used in the AddTodo component instead of passing on setTodos from the home component.
    I am not sure what are the effects from this choice. Does jest testing require that the setTodo state being passed down? I am a little confused by the added complexity and why the same approach is not used in both projects.
    sorry if it is a silly question.

  • @iamprincemuel
    @iamprincemuel Рік тому

    Superb 🙌

  • @mohamedmohi595
    @mohamedmohi595 Рік тому

    Thanx Dave 😊 🙏

  • @abrahamidowu3837
    @abrahamidowu3837 Рік тому

    Thank you for everything you do, Sir. I am determined to become a frontend developer but I am confused about🎉 the pathway to follow. There are countless of tools programmers suggest we learn.
    Through your videos I am already learning HTML, CSS and JavaScript, and I know there are more.
    Sir, can you please give me the pathway you believe is right to become a frontend developer?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Рік тому

      Link at the top of the description for this video to my free Web Dev Roadmap for Beginners.

  • @kevin-ru6oe
    @kevin-ru6oe 9 місяців тому

    21:13 Isn't recommended to have several assertions in the same test? There you could assert the mock to be called and the input to be empty

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

    Thanks dave, but how do i get to ask you questions on your discord, and i really love your videos, but then how do we test a particular function that involves the redux, maybe you can do a video on that using next js, typescript and redux

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

      You post questions in the appropriate channel on Discord where I and others can help. It is fairly active. I don't check every day but I do when I can.

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

      @@DaveGrayTeachesCode okay dave, thank you so much, but one of the questions i'd like to ask is how i can implement testing an application that utilizes redux, this is because my test keeps failing because the function i'm trying to test contains redux state

  • @emibademi1
    @emibademi1 4 місяці тому

    How to test a server action after form submission ?

  • @davithchhung7577
    @davithchhung7577 Рік тому

    Hi Dave, Should we use NextJs just for front end developement?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Рік тому

      You can. If you work through the Next.js course on my channel, you will also see that it offers backend route handlers.

  • @johndowland4623
    @johndowland4623 8 місяців тому +1

    2006 todo app: js code alone, run the app, oh there's a bug, no user cared, fixed it [total time of development 2 hours]
    2024 todo app: typescript, eslint, jest, unit test, integration test, e2e test [total time of development 2 weeks]
    we're regressing. dear recruiters of my ass, leave these sort of stuff to fang companies and don't waste our balls please

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

    where to take source code from video?

  • @DunckingTest
    @DunckingTest 11 місяців тому

    Can i request a video ? if yes, how do i login to nextauth magic email with playwright

  • @patrickjreid
    @patrickjreid 10 місяців тому +1

    This series of videos have been amazing. I am curious though, Why bother testing in Typescript? It feels like Typescript is its own kind of test and when combining it with jest you are just adding unnecessary complexity.

  • @michalnowak2181
    @michalnowak2181 Рік тому

    thx

  • @TravinskiyVladislav
    @TravinskiyVladislav Рік тому

    Like that