JavaScript Unit Testing with Mocha and Chai

Поділитися
Вставка
  • Опубліковано 22 жов 2024

КОМЕНТАРІ • 31

  • @PP-ih1bh
    @PP-ih1bh 3 роки тому +2

    Masterpice, the speed, the knowladge, the way the content is passed to the listener it just on another level. GREAT! Thank you

  • @pinakim11
    @pinakim11 3 роки тому +1

    Thanks again Steve. I am transitioning from Java to Node framework and your tutorials help me a lot.

  • @pratimadongre3612
    @pratimadongre3612 6 років тому +7

    This is one of the best and thorough tutorials on Mocha and Chai! Thank you! :)

  • @emmanuelaigbovbiosa1361
    @emmanuelaigbovbiosa1361 5 років тому +3

    Steve Griffith, you are a very good Teacher. Whoever does not understand Unit Testing with Mocha and Chai after watching this video, may find it difficult to learn anything new. Liked and subscribed.

  • @kelvinmwangemi5303
    @kelvinmwangemi5303 5 років тому +1

    It really explains the concept of testing in Javascript in an understandable manner.

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

    Than you so much Steve for preparing and uploading this content, it is very useful.

  • @myronschabe
    @myronschabe 5 років тому +2

    Great, simple, straight-forward tutorial and thank you so much for including links to the code. Also, you have a really soothing voice, which is a huge bonus :)

  • @stephenkasirye2543
    @stephenkasirye2543 4 роки тому

    Thanks Steve, for this intro to mocha & chai. I’ve been able to learn it right off the bat and even extend it to several other tests; thanks to the IntelliSense built into my coding environment of Visual Studio Code.

  • @eula9
    @eula9 5 років тому

    Thank you for explaining stuff in such a clear way, you are an excellent teacher! I always undestand the point you are trying to make!

  • @dd-v
    @dd-v Рік тому

    Eerytime I try to study somthing new regarding SWE since I started like 6 years ago I somehow end up in one of your vids. It's like learning from an old friend lmao

  • @AthenaTheSlayer
    @AthenaTheSlayer 4 роки тому

    Brilliant. Unit testing makes sense now. Thanks

  • @THESMITHGUY1
    @THESMITHGUY1 4 роки тому +4

    Freaking Phenomenal Teaching!!!

  • @アリ-t8r
    @アリ-t8r 4 роки тому +7

    Steve Griffith, more like Jesus Griffith

  • @CurrentGamer
    @CurrentGamer 4 роки тому

    Really Amazing tutorial, helped me alot with my Uni assignment!!!!

  • @ryanford516
    @ryanford516 5 місяців тому +1

    So if someone is facing an issue running the very first assertion, try popping the following line in your package.json line just above the scripts property: "type": "module". Next, remove the two require statements and put these instead: 1) import { assert } from 'chai'; and 2) import { robot as R } from '../app.js'; Finally, go to the app.js file and append this export statement to the bottom of your code: export { robot }; and remove the previous module.exports = robot;

  • @huchenqiang90
    @huchenqiang90 5 років тому

    This tutorial is really good,help me learn the tdd from scrach,thank you very much!

  • @nirmalrawtani4961
    @nirmalrawtani4961 4 роки тому

    Excellent tutorial. :)

  • @ItsyBitsyChelly
    @ItsyBitsyChelly 5 років тому

    Thank you! You are a great teacher

  • @nicolaregiacorte8328
    @nicolaregiacorte8328 3 роки тому

    CONST best_teacher_ever = "Steve Griffith";

  • @mitchell4217
    @mitchell4217 3 роки тому

    is "|| true" still valid in March 2021?
    I'm getting an error:
    "'true' is not recognized as an internal or external command,
    operable program or batch file."

  • @alexvass
    @alexvass 2 роки тому

    Why is this preferable to console.log at points in the code?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  2 роки тому +1

      Unit testing is something that is done while developing and if done properly tells you if your code is running properly and producing the correct results.
      Console.log statements are fine for a simple task where you want to know the value of a variable at one or more points in your code. But it won't check for if a function runs with invalid data. A console.log can show you a value. A well designed test can check for correct datatypes, size, length, etc.
      Test Driven Design is an approach to coding where you write the tests as a series of steps that have to be passed. You write the tests first. Then as you write your code it is validating it as you add more functionality. More effort up front but less chance of problems later. It tells you when you make mistakes as you code.
      Console.log is really just demonstrating that your code worked with the one value that you are showing in the console.

  • @tazad89
    @tazad89 4 роки тому

    Do I need to install mocha for every project?

  • @KL4NNNN
    @KL4NNNN 4 роки тому

    Line 26 of the app.js the console.log does "pew pew.", but should do "pew pew pew". Pls fix it and then do another pull.

  • @beckaldan
    @beckaldan 5 років тому

    bruh noise of your keyboards are killing me :( , just stopped watching your video at minute 8 lol

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  5 років тому +1

      My old videos were using a cheap headphone mic. All the ones in the last year and a half use a good mic with a lot less clicking.