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

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 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

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

    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.

  • @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.

  • @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

  • @sushieatingcobra
    @sushieatingcobra 7 หลายเดือนก่อน +1

    thanks

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

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

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

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

  • @Santon-Motho
    @Santon-Motho ปีที่แล้ว +2

    Dave Gray, you absolute legend! 😁

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

    Got this when needed ! 😇
    Thank you Dave Sir !

  • @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

  • @user679jk7
    @user679jk7 2 หลายเดือนก่อน

    Thank you for making this fantastic video!

  • @SadullaAlisherov-t7o
    @SadullaAlisherov-t7o ปีที่แล้ว

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

  • @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?

  • @kevin-ru6oe
    @kevin-ru6oe 10 หลายเดือนก่อน

    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

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

    Thanks Dave!
    Cheers 🎉🎉🎉

  • @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

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

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

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

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

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

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

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

      The icon theme is vscode-icons

  • @emibademi1
    @emibademi1 5 หลายเดือนก่อน

    How to test a server action after form submission ?

  • @rolf-s
    @rolf-s ปีที่แล้ว

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

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

    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.

  • @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.

  • @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.

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

    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  6 หลายเดือนก่อน

      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 6 หลายเดือนก่อน

      @@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

  • @_renamed_
    @_renamed_ 4 หลายเดือนก่อน

    where to take source code from video?

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

    Thanx Dave 😊 🙏

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

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

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

    Superb 🙌

  • @patrickjreid
    @patrickjreid 11 หลายเดือนก่อน +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

  • @johndowland4623
    @johndowland4623 9 หลายเดือนก่อน +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

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

    Like that