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.
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 :)
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.
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
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;
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."
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.
Masterpice, the speed, the knowladge, the way the content is passed to the listener it just on another level. GREAT! Thank you
Thanks again Steve. I am transitioning from Java to Node framework and your tutorials help me a lot.
This is one of the best and thorough tutorials on Mocha and Chai! Thank you! :)
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.
It really explains the concept of testing in Javascript in an understandable manner.
Than you so much Steve for preparing and uploading this content, it is very useful.
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 :)
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.
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!
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
Brilliant. Unit testing makes sense now. Thanks
Freaking Phenomenal Teaching!!!
Steve Griffith, more like Jesus Griffith
Really Amazing tutorial, helped me alot with my Uni assignment!!!!
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;
This tutorial is really good,help me learn the tdd from scrach,thank you very much!
Excellent tutorial. :)
Thank you! You are a great teacher
CONST best_teacher_ever = "Steve Griffith";
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."
Might not run on Windows. you could use exit 0 instead of true.
@@SteveGriffith-Prof3ssorSt3v3 That was it! Thanks!
Why is this preferable to console.log at points in the code?
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.
Do I need to install mocha for every project?
if you want to do unit testing with them, then yes.
@@SteveGriffith-Prof3ssorSt3v3 Thank you!
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.
The shooting was slowing down, less than 50, so it is only pew. pew.
bruh noise of your keyboards are killing me :( , just stopped watching your video at minute 8 lol
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.