React Testing Library Tutorial #7 - Using Query Methods

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ย. 2024
  • Check out Laith's TH-cam channel for more tutorials:
    / @laithacademy
    🐱‍💻 Access the course files on GitHub:
    github.com/har...
    🐱‍👤 Get access to extra premium courses on Net Ninja Pro:
    netninja.dev
    🐱‍💻 Full React Course:
    • Full React Tutorial #1...
    🐱‍💻 Social Links:
    Facebook - / thenetninjauk
    Twitter - / thenetninjauk
    Instagram - / thenetninja

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

  • @Gigusx
    @Gigusx 3 ปีที่แล้ว +17

    Knowing what to test, and even more importantly what NOT to test is the most important thing in testing. It's very easy to be inefficient and write useless tests, at which point it doesn't matter if you have any tests at all.

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

      can you please tell what to test and what not to test? i am currently learning testing

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

    This is a really good series. The way you built up the foundation was remarkable.

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

    The most underated series. Thank you very much

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

    Boss Shaun thanks for Hosting !!!!
    sir Laith :D last few episodes are awesome !!!

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

    Hello! I just finished your python beginner series please make the advanced one! This taught me so much. You are the best teacher out there!

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

      Thanks so much!

  • @sahilkc23
    @sahilkc23 3 ปีที่แล้ว +8

    i loved it , really well explained my friend ❤️

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

    This is such an important topic but I never see good courses about it. In my personal projects I have difficulty in async functions, hope this series will answer my questions. Keep it up.

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

    I love your way of explaining. Great series!

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

    Thank you so much for this free course on Testing. I really appreciate the effort.

  • @chetanjain4616
    @chetanjain4616 2 ปีที่แล้ว +5

    I have a suggestion please, use full screen of code editor at time, because Laith here has his sidebar, editor and terminal all open in same screen and I understand that he has a wide monitor so its not that difficult for him to keep track of whats where but my eyes are hurting looking at the screen even in full screen in TH-cam. So If possible can you do something about that in the future videos?
    Great Course BTW!

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

    Omg the best teaching video for testing man , really appreciate it :d

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

    love it, thank Laith and The Net Ninja

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

    thanks laith n shaun.

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

    I think the test would provide more informative feedback if you prioritised finding by an attribute that is highly certain, such as testId, then asserting the expected text value instead of finding by the text value. It proves that the element is visible but may not have the expected text value instead of not finding the element at all.

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

    beautiful series bro. Thank you

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

    I wonder why we use async instead of normal arrow function inside the test/it blocks?

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

      its because some of the query methods need to be `await`ed

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

    Hi why is there async in the query method?

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

    5:33 you almost turned into a brit for a split second there

  • @timothyn4699
    @timothyn4699 9 หลายเดือนก่อน

    interesting, but I don't get why use queryBy vs findBy, other than it sounds like queryBy is async. For me atm, it's not seeming to find "meetup" text within content of an a tag when I try to findby or queryby text for reasons unknown (trying to verify it can see the meetup url I have)

  • @doniaelfouly4142
    @doniaelfouly4142 8 หลายเดือนก่อน

    thanks

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

    When u use any of the query methods, is the entire application checked for the element you're querying or is it just in the component

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

    Can you use gRPC for your next tutorial?

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

    Could you please bring videos on FIREBASE USING REACT AS it seems to be very difficult to understand from OTHER TH-cam VIDEOS and please please please create VIDEOS on ALL OTHER FIREBASE FUNCTIONS such as ( "" AUTH (phone email OAUTH etc..), CRUD, HOSTING using REACT. I'm Unable t learn from any other TH-cam Videos EXCEPT u. Please Please Please

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

    The purpose of the tests ('should render same text passed into title prop') was never tested. You just found some header element.

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

    Whats the main difference between test and it?

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

    Great Video :)

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

    .not chaining is really interesting (~14 min)

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

      expect (headingElements. length). toBe(2) - toBe is also new from previous videos

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

    Any MERN stack coming soon?

  • @LuisMedina-ok5cg
    @LuisMedina-ok5cg ปีที่แล้ว

    1:30 interesting...

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

    Second

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

    I'm pretty sure this guy likes cats

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

    Man just show the easiest way or make a component which has div, section, p tag, links ... And show us how to write a test properly. You are like we can do that ... We can choose that... Bla bla bla bla options are never ending. In the end i have no idea how to choose a fucking h1 tag. This is not a good way to teaching. There is a reason we are watcing these videos instead of reading documentation.

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

      Maybe you lack imagination or coding skills if that is hard for you to figure out. No offense!

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

    This. Sucks. So. Much.

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

    2:32 - 2:38 is THEE answer I've been looking for since yesterday. You're a god sent my G. S/O @Laith