TDD in JavaScript | Test Driven Development

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 พ.ย. 2024

ความคิดเห็น • 27

  • @JJP-lb3ek
    @JJP-lb3ek 3 ปีที่แล้ว +10

    I think its worth mentioning in these type of videos, that a huge advantage of TDD is that you are making a sort of checklist about what it is that you want your software to do. These "checklists" help me know what the next step will be, and I dont feel as lost as before.

  • @ericschmidt6129
    @ericschmidt6129 3 ปีที่แล้ว +2

    A very good introduction to TDD. I just started using TDD a month or so ago and I found this to be a helpful description of the process.

  • @arbinshrestha
    @arbinshrestha 2 ปีที่แล้ว

    you know just how much sense this just makes

  • @NinjaJutsu-y4d
    @NinjaJutsu-y4d 8 หลายเดือนก่อน

    A very good introduction to TDD. SIMPLE

  • @sarabwt
    @sarabwt 3 ปีที่แล้ว +4

    I might be really nit picky, but you never want to write a test that passes because you cannot be sure that it is testing anything. That is the sole purpose of red, green, refactor - to confirm that the code you wrote actually had an effect on a test. Also, you would be better off if you delayed the happy case until the very end, because even in your example the happy case test passed, but the implementation was completely wrong, making the test useless at that point. Anyways, really enjoyed the video, keep it up :D

    • @SamMeechWard
      @SamMeechWard  3 ปีที่แล้ว +5

      Be very very very careful of absolute statements like that when it comes to programming. red, green, refactor is a guide; not the absolute rule.
      It's fine to write a test that passes, you need to make sure you have a "sufficient" number of tests and sometimes a test will pass already. This is not a bad thing. It does make it a little bit more difficult to know if the test is accurate, but not impossible. Also the test won't have to change so the test is still very useful for to achieve the end result.

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

    Everything was very well laid out! Thank you for this great content!

  • @mathieupbourgeoismat4330
    @mathieupbourgeoismat4330 3 ปีที่แล้ว +4

    Great content! It would be awesome to have something similar for frontend TDD (react, angular, vuejs; whichever)

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

    Best TDD video i've seen so far nice one

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

    Killing it! What's up next? before/beforeEach? Or what it is that's actually making the test fail (an error being thrown)?

  • @anaskhan9977
    @anaskhan9977 3 ปีที่แล้ว

    thanks sam. you are a saviour

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

    Let's always do alot of good

  • @yogesh-yadav
    @yogesh-yadav 3 ปีที่แล้ว +1

    superb

  • @leandrogehlen5621
    @leandrogehlen5621 2 ปีที่แล้ว

    I'm starting with TDD now.I might be wrong, but seems to me that TDD is better done with OOP them functional.Because of the clean archtecture and SOLID principals and the resulting design.What do you think about that?
    🖖🙏

  • @brhoom.h
    @brhoom.h 5 หลายเดือนก่อน

    I have questions! when I use TDD with the express, should I test my endpoints API with the password validation? or should testing APIs be the last thing I should do before making the app in production?

  • @DuyTran-ss4lu
    @DuyTran-ss4lu 2 ปีที่แล้ว +1

    Cool

  • @sammygopeh7578
    @sammygopeh7578 2 ปีที่แล้ว

    Again, THANK YOOOOOOOUUUUU!!!

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

    Great video!

  • @stevensidhu8368
    @stevensidhu8368 3 ปีที่แล้ว

    Quality Content 🤗

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

    Thanks for this vid

  • @jonydude
    @jonydude 3 ปีที่แล้ว

    Very new to TDD, so forgive the rookie question.
    I’m working very closely with HTML and CSS, so often what I want to test is “does this look right?”
    Even down in the JavaScript level, i often find myself pressed to describe what my desired output is, but I’ll know it when I see it.
    Is there a way to get the test outputs to appear in the browser so I can physically see that yes that’s the output I want, before writing the function that will produce it?
    I really want to get into TDD, but manipulating html, I fear the tests will be harder to write than the code.

    • @AlbertoPNeto
      @AlbertoPNeto 3 ปีที่แล้ว

      I do not know if you've found your answer yet, but yes, you can. You want a frontend test. This frontend test could be an integration test, for example, you render just a single component and validate the content visible.
      There is also a technique that snapshots your screen (let's say at the end of a test) and then compares it to a previous snapshot. These, I think, would usually be used along a e2e test.
      You could use jest on your unit test, and cypress on your e2e testing

  • @leanne333
    @leanne333 3 ปีที่แล้ว

    🤗🤗🤗🤗

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

    🥰🤗