Introduction to Jest Testing | JavaScript Unit Tests

Поділитися
Вставка
  • Опубліковано 16 січ 2025

КОМЕНТАРІ • 77

  • @sandroffdsantos
    @sandroffdsantos Рік тому +24

    Been using Jest testing for web applications for almost 6 months and one thing that i´ve noticed on the web was the lack of a well structured tutorial about software testing and more specifically Jest Testing.
    So thank you Dave for the amazing content.
    Looking forward for a further chapters of this educational content.

    • @evanilsonp.8183
      @evanilsonp.8183 10 місяців тому

      How do I use jest with my crud methods?

    • @evanilsonp.8183
      @evanilsonp.8183 10 місяців тому

      Basically I want to test my crud methods

  • @chiragchhajed8353
    @chiragchhajed8353 Рік тому +18

    Wow, I can't express how excited I am to see you've started a testing tutorial series! 🙌 I've been looking forward to learning more about testing for quite a while, and your videos are just what I needed.

  • @ahmad-murery
    @ahmad-murery Рік тому +8

    Hello my friend,
    I don't do testing very often due to very strict deadlines, but it's always good to do so,
    8:30 since we're passing an empty string to the join method no commas will be created, on the other hand, passing nothing(undefined) will add commas,
    Thanks Dave!

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

    After a one year programming break, I really needed this playlist. I already knew all of them, but this was the best refresher I needed. Clean, short and very easy to understand. Please keep up the good work and continue making youtube videos!!!

  • @TonyStark90743
    @TonyStark90743 Рік тому +2

    Much needed video , please cover unit testing , integration testing, End to end testing , React test library , Cypress

  • @md-abid-hussain
    @md-abid-hussain Рік тому +1

    Didn't see that comming.
    Excited for this series

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

    pls, continue this. thank you again, Dave.

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

    Thanks Dave💯 Pure Gold!

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

    Oh thank you for this series. I can't wait for you to get to the advanced testing such as making network requests, redux , axios interceptors and others.....I'm watching every testing video you are making....

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

    nice intro to jest thank you, excited to integrate this into my Next.js app

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

    Awesome intro to unit testing with jest. We use jest extensively at my job. This is a great way to get back to basics, understand how jest integrates with npm, and how to use it to write better code!

  • @codersdance
    @codersdance Рік тому +2

    Thank you so much. I have no words to appreciate the way you teach.
    word.toLowerCase().split('').reverse().join('') won't include the commas. So we won't need the replaceAll part. I know you know this, but you just came up with a quick solution. Mentioned it for the viewers.

  • @fares.abuali
    @fares.abuali Рік тому +1

    Great topic 🎉
    Thanks Dave

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

    Seriously, Dave! Thank you so much for doing this! Your channel as really helped me grow and progress within my journey! I've been trying to find some content creator that would create content solely for JEST! Thank you so much!

  • @rdubb77
    @rdubb77 7 місяців тому

    Great video, I like how you use non trival examples and work in clean code principles.

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

    Fantastic tutorial! Thank you so much! 💛

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

    Cannot wait to see the content about cypress vs jest, and when we need to use them. Lovely.

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

    So excited! Thank you sir! Will definitely be sharing on my LinkedIn once done with mine!

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

    Thank you for the amazing content Dave. The timing is perfect.

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

    Real nice! Thanks. I will add the tests when the strings are null or undefined.

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

    Amazing, I need to wrote whole bunch of test in work. Really appreciate your work

  • @a_maxed_out_handle_of_30_chars

    thank you, simple and to the point :)

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

    Really appreciate your work 🙌

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

    I just started testing for an e-commerce web app created with next js and typescript
    i had hard time configuring jest and typescript for unit and component testing
    but setup cypress pretty easily
    i hope this video help me understand jest and testing better
    thank you Dave for great content

  • @vladyslav-py-js-go
    @vladyslav-py-js-go Рік тому

    Nice explanation, thank you 😁

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

    This was amazing, thank you so much!

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

    That was a good simple intro. Thank you.

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

    Excellent video, thank you very much!!!

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

    Thanks a lot for starting this series ❤, I can't thank you enough for this series as there almost no good tutorials around testing for web devs,
    I don't know much about testing yet, but it would be helpful if you could also teach e2e testing, basically enough about testing that is expected from a web developer.

  • @abc_noob
    @abc_noob Рік тому +8

    Nice thumbnail 😂

  • @joker-wr8pt
    @joker-wr8pt Рік тому +4

    I've a request sir please teach us how to test the api via jest I did the testing via jest for my express api but still have some confusion in stubs and mocks especially how we can test the api in the mvc structure like where our controller is interacting with services huge request

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

    Thanks Dave, you've really helped on my Javascript journey i do really appreciate... I wish you could talk about getting a job, cause i feel I've been writing codes for myself, but all same thanks alot

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

    Really waiting for the videos

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

    I am so happy that you started doing the test series!! Could I request a content about call by reference vs call by value vs call by sharing? It's quite confusing since it works differently in other languages.

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

    Thanks for this great lesson hope we see react and typeScript tests soon

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

    I have just finished a 3 hours long Cypress tutorial with E2E and Component testing. Let's see what Jest brings us =)) Thank you Dave!

  • @stevieholland3579
    @stevieholland3579 Рік тому +2

    I am sure you get a million requests for topics, but could you please do a data structures and algos course? Basic linked lists, trees and graphs, big O, recursion etc. Your explanations are so in depth and helpful. I would love to see a dsa playlist at some point. Forgive me if you have this and I just have not found it yet.

  • @shubhamgupta-bl1tr
    @shubhamgupta-bl1tr Рік тому +2

    Sir please make a video on how to test the react component which includes redux, custom hooks with mock api...I mean to test complex react components

  • @ПавелМ-к8в
    @ПавелМ-к8в Рік тому

    Thanks Dave, very clear explanation, I hope you'll continue this theme and also cover RTL.

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

    Thanks Dave. Do you plan to do any DevOps videos for aws in future?

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

      I'm definitely interested in doing that. I haven't had many requests for it, but it might still be good.

  • @messiisthebest
    @messiisthebest 11 місяців тому +1

    thanks , now i am pro unit tester😂😂

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

    Hello Dave, thank you for providing such amazing content. I have recently begun learning how to write tests for web applications and have started using Vitest as my testing framework. Do you think this is a good choice for testing?

  • @Mike-jq7os
    @Mike-jq7os Рік тому

    please please please, we need a full course

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

    looking forward the next, please update Dave, please!

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

    thanks dave :) You're great! Will u continue this series. And will it come with nextjs or react. It would be perfect.

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

    Is this a new playlist? Will you create more about it?

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

    was really hoping this would be with nodes new internal testing library since it's gonna be available out of experimental with node 20

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

    thanks

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

    Thanks, awesome tutorial! To me one of the issues ist the frontend, responsiveness and such things. That cannot be done with jest, right? Selenium or others?

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

      You're welcome! Yes, you're looking at the UI there. Possible automation but devs also use tools like Browserstack to visually look at different devices, too.

  • @Mike-jq7os
    @Mike-jq7os Рік тому +1

    To avoid wrong autocompletion, you can press the escape key and continue typing

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

      Thanks - yeah, I kept forgetting it was going to autocomplete what I didn't want. I don't always look while I'm typing lol.

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

    But is possibile to show the output on the browser? Like Jasmine?

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

    thx

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

    Perfect thumbnail 🤣

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

    you don't need replaceAll(',','') already join with empty string will concat all string with an empty string

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

    Hey @Dave,
    Could you please create one Next.Js 13 Project using material UI on server side including the state management(redux for example) in Next app ?

  • @evanilsonp.8183
    @evanilsonp.8183 10 місяців тому

    I mean, i just want to test my crud methods and i can't find how to do that

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

    in react? cypress, react-testing-library???

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

    for coverage, even if I dont write a test for reverseString, it still shows a 100% coverage

  • @sanjaymishra-ec9lw
    @sanjaymishra-ec9lw Рік тому

    Sir I have learned HTML ,CSS and Java Script please suggest me what I will have to read to become frontend developer.

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

    Thanks for the tutorial. Why is this so slow though? It seems every new test adds about a second despite functions being super simple. In a large codebase this would be a nightmare. I don't really have experience testing JS but with Python (pytest) this would take milliseconds.

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

      Welcome - several reasons for the first run slowness here: www.google.com/search?q=why+is+jest+slow

  • @iBen-ry6pj
    @iBen-ry6pj Рік тому

    I don't understand how testing libraries work behind the scenes so am like...... What's the point? How about just auto generating all possible inputs and supply to a function and watch the output/returned value? This jest testing appears to run a test using just one value so I don't see the point. But before I blab plenty of nonsense, let me research more about it. Thanks though!

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

    boss!

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

    I can't focus on programming becouse i think only about money and how powerful it will make me! How to forget about a lot of money and start focusing on work?

  • @abhinavtiwari89
    @abhinavtiwari89 9 місяців тому

    Thumbnail 😂😂

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

    You would better not have names collisions (like sum is both function and file name) in toutorial purposes - it will mix up newbies

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

    Please vitest

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

    only girlymen write tests to check their code

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

    'Hellert ,
    Im here revising the video before beginning the testing with typescript video