TDD Live Coding - Test Driven Development Tutorial with React, Jest, and Enzyme

Поделиться
HTML-код
  • Опубликовано: 16 ноя 2024

Комментарии • 65

  • @ProgrammingMadeEZ
    @ProgrammingMadeEZ  4 года назад +23

    Let me know what you think of the video!

    • @ProgrammingMadeEZ
      @ProgrammingMadeEZ  4 года назад +2

      In the comments...

    • @LifeWithRilla
      @LifeWithRilla 3 года назад

      You're awesome this video is extremely useful! Thanks!

    • @LifeWithRilla
      @LifeWithRilla 3 года назад

      Liked, subscribed, and hit the notification bell... should say enough! :)

    • @nxtcoder1790
      @nxtcoder1790 3 года назад

      Why did you switch to a class component, I really want to know how to do things only with functional components

    • @bastiat6865
      @bastiat6865 2 года назад

      This was extremely helpful as an overview of the strategy intended by TDD.
      The examples were specific and blended well with the conceptual understanding and the principles we want to
      explore in testing methodology.
      Following along, it's more helpful if you finish a thread of thought, and come back to any tangent AFTER the over-arching thread.
      In my experience, the diverging in the moment can easily confuse people. It's easier to make sense if we come back to it after the main idea.
      It seems useful to address potential questions in the moment, and may work for some people, bu by and large the majority of people don't learn
      well from that strategy. It's better to close cycles first and then revisit. It's harder on the instructor, but it is an easier way to repeat the overarching
      process while introducing the minutae. Otherwise, it causes the minutae to take greater importance in the flow than it should.
      Anyway, thanks for this. Very helpful.

  • @thetruthsayer8347
    @thetruthsayer8347 3 года назад +15

    Please don’t stop going in-depth. That’s why I watch

  • @RyanFromUltrasound
    @RyanFromUltrasound 4 года назад +17

    been struggling with TDD for React for a while now. Lots of 'ah ha' moments here. Thank you.
    EDIT: TDD way more fun than second guessing yourself every step of the way :P

  • @arafattai9895
    @arafattai9895 4 года назад +1

    Great video. I've been struggling with TTD for some time and had a great time learning this. Thank you for sharing the knowledge.

  • @Muaddibkhan
    @Muaddibkhan 2 года назад

    Damn you youtube, why didn't you suggestion this before
    Amazing Job love your in-depth explanation

  • @markclausnunes
    @markclausnunes 4 года назад

    Thanks a lot for making this video. Most of the React tutorials don't show how to write tests and even fewer of them use TDD. Videos like yours are rare, thanks again!

  • @susmitobhattacharyya1668
    @susmitobhattacharyya1668 3 года назад

    and I hit that Subscribe button because I don't want to miss any videos coming from this channel in future.
    Thanks for this content.

  • @stevenespinoza6277
    @stevenespinoza6277 2 года назад

    Yes amazing love your explanation. I have been struggling for some time and you made me understand TDD

  • @higorcoimbra6591
    @higorcoimbra6591 3 года назад

    Although I'm working with TL, that was pretty useful to learn about a workflow of Unit Tests on a visual aspect. Thanks a lot!

  • @americovaldazo4441
    @americovaldazo4441 4 года назад +1

    I've been watching tons of Jest and Enzyme tutorial videos the last weeks and all i found is crap until today. But searching harder on RUclips I found this channel and this is, by far, the best, well explained and most complete video about Jest testing in RUclips. I'm now suscribed to your channel. Thank you very much.

  • @pintunag
    @pintunag 4 года назад

    What a wonderful way of teaching and conveying the message so perfectly, Thank you so much for this awesome session.

  • @preethamgowda
    @preethamgowda 3 года назад

    That is some damn good explanation for beginners like me. Thank you so much!

  • @LifeWithRilla
    @LifeWithRilla 3 года назад +2

    I'm currently taking a Udemy Course where the instructor is going through Jest/Enzyme testing and the combination of this video with that course is honestly brilliant. I'm learning a lot! Thanks for creating this video! I also noticed that you were worried about the views you had prior to the views that came later. I hope that provided you with some insight to the value you're bringing to the table! This video is amazing! Don't worry about live viewers! Thanks so much!

    • @mufty_codes
      @mufty_codes 3 года назад +1

      Hi, can you drop the link to the Udemy course?

    • @Seb16291629
      @Seb16291629 3 года назад

      Interested too

  • @davipersan
    @davipersan 4 года назад +1

    Very useful video, amazing work thanks for share it !!

  • @AlexTurner_666
    @AlexTurner_666 2 года назад +3

    6:23 3 laws of TDD
    26:00 Writing first test
    36:30 Second test
    44:30 third test
    49:00 4th test

  • @elatighetfaghaoubeid9463
    @elatighetfaghaoubeid9463 3 года назад

    Informative video, Thanks

  • @rexgamaxxx
    @rexgamaxxx 2 года назад

    Awesome video. i learned a lot today. thank you

  • @giannaasher7232
    @giannaasher7232 2 года назад

    That's Great! Thank you so much.

  • @victoriapetrone4841
    @victoriapetrone4841 3 года назад

    Really helpfully video. Your explain really good! totally recommended

  • @DenisTruong
    @DenisTruong 2 года назад

    Steve thank you so much !

  • @piyushmahapatra6405
    @piyushmahapatra6405 3 года назад

    Damn! Never realised that learning TDD could be this fun and interesting! Kudos to the Awesome explanation. If you ever make any udemy course,I will buy it!!

  • @dilrubakhan7112
    @dilrubakhan7112 3 года назад

    Well explained. Thanks

  • @akshaymenon3856
    @akshaymenon3856 3 года назад

    Thank you very much for this video !!

  • @HeinekenLasse
    @HeinekenLasse 4 года назад

    Great video, great final thoughts

  • @guslei
    @guslei 3 года назад +5

    Hi. I watched the whole video and is really explanatory. Did you have any experience having to test functional components with hooks?

  • @yusufabdulhafiz8757
    @yusufabdulhafiz8757 3 года назад

    Kudos!!! This is the best videos on TDD I ever encourtered....you save me alot of stress....Thanks so much

  • @jeffgarner5891
    @jeffgarner5891 4 года назад +3

    Thanks so much for making this video! I'm just new enough to React that I've just started TDD, and this lesson made me an instant fan. Do you intend on making more videos to elaborate on this concept? If not, what resources would you recommend that could efficiently show me how to implement testing on my next project to a professional extent?

    • @ProgrammingMadeEZ
      @ProgrammingMadeEZ  4 года назад +1

      I will be making more videos as time permits. As for more resources I highly recommend reading Extreme Programming explained 2nd edition by Kent Beck. There's also plenty of other RUclips video's on TDD although they typically are geared toward back end rather than front end. The cycle is still the same though for JS as it is in Java, C#, Python, Ruby, etc.

    • @jeffgarner5891
      @jeffgarner5891 4 года назад +1

      @@ProgrammingMadeEZ Much appreciated! Subscribed - keep up the good work!

  • @NeverSerg
    @NeverSerg 4 года назад +1

    Very useful video. Thank you =)

  • @savaramkiran
    @savaramkiran 3 года назад

    Superb!! explanation, Please create a video with Clean Architecture for React Please.

  • @mahendranath2504
    @mahendranath2504 2 года назад

    Thank you so much 👍🏼🎉🙏⭐🤛

  • @piyushmahapatra6405
    @piyushmahapatra6405 3 года назад

    Bro, are you making any videos as sequel to this !
    Halfway through the video and loving it!!

  • @codingtips3774
    @codingtips3774 Год назад

    Interesting way of doing things ! Thank you for sharing this.
    But as Kent Beck said ( the author of TDD ), TDD is about testing business rules not implementation details !
    I see that you're using Enzyme here ! Testing library has replaced Enzyme because in frontend we avoid testing implementation details to let the front-end flexible to change it very easily.

  • @tommy_corey
    @tommy_corey 4 года назад +1

    Great video. Learned a ton

  • @marcosmillas5562
    @marcosmillas5562 3 года назад

    You are the best!

  • @kag3670
    @kag3670 3 года назад

    U ARE GREAT!!!!!!!!!

  • @juanmanuelcataldopavan6328
    @juanmanuelcataldopavan6328 2 года назад

    Hello sir! I'm following this video because I have a final interview this friday, and I'm trying to learn a litle bit more about testing. I'm having troubles to mock Hooks with functional components with React 18. Do you know what is the best dependency (or way) to do so? Thanks for this content, very usefull.

  • @iamabhirupdatta
    @iamabhirupdatta 3 года назад

    Any idea why at 1:49:04 , the personListItems[0] didn't work but personListWrapper.find('li') works.

  • @barkleysanto3709
    @barkleysanto3709 Год назад

    Are there any alternatives to Enzyme? As Enzyme is not supporting React versions past 16.

  • @dita0322
    @dita0322 3 года назад

    Where can I find the code you write in this tutorial? thanks.

  • @susmitobhattacharyya1668
    @susmitobhattacharyya1668 3 года назад +1

    can you please create a small project with tdd implementation?

  • @animeshawasthi2399
    @animeshawasthi2399 3 года назад

    this is the course for the beginners level..? who dont know anything about jest and enzyme ?

  • @veronikak513
    @veronikak513 2 года назад

    Why my enzyme is not downloading?? its shows me error

  • @nakulbhatt21100
    @nakulbhatt21100 4 года назад +1

    Good job buddy, good tutorial, easy to understand.
    Though I didnt understand one thing. When i ran "npm test" it passed all the tests but when i ran "npm test -- --coverage" to check the coverage it failed 6 out of 9 tests and only 3 tests passed.
    Also didnt understand why code coverage for PersonList is 50%.
    -------------------------------|-------------------|-----------------|----------------|---------------|-------------------|
    File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
    -------------------------------|-------------------|-----------------|----------------|---------------|-------------------|
    All files | 6.67 | 0 | 10.53 | 6.67 | |
    App.js | 100 | 100 | 100 | 100 | |
    PersonList.js | 50 | 0 | 50 | 50 | 5 |
    index.js | 0 | 100 | 100 | 0 | 7,17 |
    serviceWorker.js | 0 | 0 | 0 | 0 |... 32,133,135,138 |
    ------------------|----------|----------|----------|----------|-------------------|
    Test Suites: 2 failed, 2 total
    Tests: 6 failed, 3 passed, 9 total
    Snapshots: 0 total
    Time: 17.683s
    Ran all test suites.

  • @Flame-on-f2p
    @Flame-on-f2p 3 года назад

    great video, but I have a question tho, how do I test component with responsiveness, what if the specific element appears on the desktop screen and disappears in the mobile screen how do I test that specific element, I already looked upon StackOverflow but they say there is no support for screen size while testing in react testing library, please can u explain how you test responsive components in a video or in a comment in detail I'm new to testing, thx

  • @nirrepluap
    @nirrepluap 4 года назад +1

    Actually, never use the data's array index as key in array of components.. A key should be unique, and identify the related value, if you change the value at index 0, the key won't change, and react won't know the value has changed.

    • @ProgrammingMadeEZ
      @ProgrammingMadeEZ  4 года назад

      I wouldn't say never, but it isn't recommended if you can use something else like an id property on the object.

  • @TheRicoco2011
    @TheRicoco2011 4 года назад +1

    I was finding the start promising, but I've stopped watching it at 45'. At this point, you started to switch to class based component and to test implementation details which I believe is not a good practice. I found this article: kentcdodds.com/blog/react-hooks-whats-going-to-happen-to-my-tests and I think that is more suitable with my way of testing things. Thanks.

    • @ProgrammingMadeEZ
      @ProgrammingMadeEZ  4 года назад +1

      There has been a move by the React team to switch from class based components to functional components. It's too bad though really, many people who are familiar with object oriented structures prefer the class based approach. Kent is a good teacher too, if you want to learn to do functional component testing by all means click the link. I do want to point out it has nothing to do with TDD as an approach and instead focuses on how to test functional components that use hooks. Feel free to use nzombies for a heuristic of TDD and Kents explanation of writing implementations that use React hooks.

  • @sukhdevsingh-xm8nz
    @sukhdevsingh-xm8nz 4 года назад

    Hey buddy I wanna learn ms access with vba.......but I wanna learn complete.....not only basic tqq

  • @mdgolamkibria9864
    @mdgolamkibria9864 3 года назад

    Ist this funny in real life development where a component changed by many developers

  • @paramjeet975singh3
    @paramjeet975singh3 4 года назад

    i want to learn complete ms access with vba ??

  • @ketankshukla
    @ketankshukla 4 года назад

    You create the App.js file before writing a test that checks the existence of that file. You have given birth to the file and the production code without writing a test that gives birth to the file and the code inside of it. This is a violation of TDD. You should blow away the whole src directory, create your App.test.js file and then start writing your tests that will give birth to the folder structure, then the files in those folders, then the code in those files. You don't start with a structure and THEN write the tests. This is a direct violation of what TDD is all about.

    • @ProgrammingMadeEZ
      @ProgrammingMadeEZ  4 года назад +1

      Yeah yeah yeah... always a critic in the crowd. lol. But you're right, better to let the tests drive the architecture.

    • @ketankshukla
      @ketankshukla 4 года назад +1

      @@ProgrammingMadeEZ To be fair to you, I think for the purposes of a RUclips demo, I shouldn't have come out so strongly, but I'm glad you took my well intended remarks in stride! Cheers man!