TDD in JavaScript | Test Driven Development

  Рет қаралды 12,491

Sam Meech-Ward

Sam Meech-Ward

Күн бұрын

Learn how to use test-driven development (TDD) in your JavaScript applications to help guide your software development.
🔗Code:
github.com/Sam...
🔗Moar Links
My Website: www.sammeechwa...
Instagram: / meech_ward
Github: github.com/org...

Пікірлер: 28
@JJP-lb3ek
@JJP-lb3ek 3 жыл бұрын
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 жыл бұрын
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.
@sarabwt
@sarabwt 3 жыл бұрын
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 жыл бұрын
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.
@arbinshrestha
@arbinshrestha 2 жыл бұрын
you know just how much sense this just makes
@RioKnightley
@RioKnightley 3 ай бұрын
Best TDD video i've seen so far nice one
@mathieupbourgeoismat4330
@mathieupbourgeoismat4330 3 жыл бұрын
Great content! It would be awesome to have something similar for frontend TDD (react, angular, vuejs; whichever)
@NinjaJutsu-y4d
@NinjaJutsu-y4d 6 ай бұрын
A very good introduction to TDD. SIMPLE
@natewalchenbach8413
@natewalchenbach8413 Жыл бұрын
Everything was very well laid out! Thank you for this great content!
@AwesomeEnterpriseInc
@AwesomeEnterpriseInc 3 жыл бұрын
Killing it! What's up next? before/beforeEach? Or what it is that's actually making the test fail (an error being thrown)?
@DuyTran-ss4lu
@DuyTran-ss4lu 2 жыл бұрын
Cool
@Mari_Selalu_Berbuat_Kebaikan
@Mari_Selalu_Berbuat_Kebaikan 2 ай бұрын
Let's always do alot of good
@brhoom.h
@brhoom.h 3 ай бұрын
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?
@yogesh-yadav
@yogesh-yadav 3 жыл бұрын
superb
@anaskhan9977
@anaskhan9977 3 жыл бұрын
thanks sam. you are a saviour
@leandrogehlen5621
@leandrogehlen5621 Жыл бұрын
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? 🖖🙏
@aprilm2941
@aprilm2941 3 жыл бұрын
🥰🤗
@stevensidhu8368
@stevensidhu8368 3 жыл бұрын
Quality Content 🤗
@adriocoder9192
@adriocoder9192 3 жыл бұрын
awesome
@tech3425
@tech3425 Жыл бұрын
Thanks for this vid
@jacobthedev4979
@jacobthedev4979 Жыл бұрын
Great video!
@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 жыл бұрын
🤗🤗🤗🤗
@SamMeechWard
@SamMeechWard 3 жыл бұрын
🤗
@sammygopeh7578
@sammygopeh7578 Жыл бұрын
Again, THANK YOOOOOOOUUUUU!!!
@SamMeechWard
@SamMeechWard Жыл бұрын
🤗
Testing Node Server with Jest and Supertest
11:45
Sam Meech-Ward
Рет қаралды 117 М.
Unit Testing in Javascript | Writing Automated Tests With Jest
18:53
Sam Meech-Ward
Рет қаралды 22 М.
МЕБЕЛЬ ВЫДАСТ СОТРУДНИКАМ ПОЛИЦИИ ТАБЕЛЬНУЮ МЕБЕЛЬ
00:20
Самое неинтересное видео
00:32
Miracle
Рет қаралды 2,6 МЛН
The CUTEST flower girl on YouTube (2019-2024)
00:10
Hungry FAM
Рет қаралды 49 МЛН
TDD Is The Best Design Technique
19:26
Continuous Delivery
Рет қаралды 50 М.
Introduction to Test Driven Development with React
20:38
Coding With Adam
Рет қаралды 20 М.
Test Driven Development vs Behavior Driven Development
18:42
Continuous Delivery
Рет қаралды 152 М.
TDD: The Bad Parts - Matt Parker
30:17
VMware Tanzu
Рет қаралды 54 М.
Test-Driven Development // Fun TDD Introduction with JavaScript
12:55
Test Driven Development: The best way to code that I almost never use
19:35
Test Driven Development Tutorial For Beginners
23:54
Continuous Delivery
Рет қаралды 61 М.
Every Developer Needs a Raspberry Pi
27:27
Sam Meech-Ward
Рет қаралды 555 М.
Test Driven Development (TDD) | Crash Course | 2020
43:53
Amigoscode
Рет қаралды 125 М.
Introduction to Test-Driven Development (TDD) with TypeScript | 2021
13:35
МЕБЕЛЬ ВЫДАСТ СОТРУДНИКАМ ПОЛИЦИИ ТАБЕЛЬНУЮ МЕБЕЛЬ
00:20