An Introduction to Test-Driven Development in JavaScript

preview_player
Показать описание

--

Red - Green - Refactor!

Red: Write a test. The test fails because you haven't written any code yet.

Green: Write code that passes your test (and all previous tests). Don't be clever, just write code so your tests pass!

Refactor: There are many reasons to refactor, such as efficiency, code style, and readability. Make sure your code still passes your tests as you refactor.
Рекомендации по теме
Комментарии
Автор

I´m a manual tester training myself to move to automation and do more coding, this video is easy to understand and follow. On why to use TDD, I recommend the book "The Clean Coder" by Robert C. Martin, chapter 5 talks about TDD. Thanks for the video, I will look for more excersices and katas for this.

omarkabada
Автор

Wow men...We need more videos like this. It's so powerful TDD. Please make more videos of TDD for nodejs, express, etc. Great Tutorial!

alanmejia
Автор

Great lesson. My team has started using TDD and I really like it. Not everyone on the team gets it though. We still have some people coding first and then writing the tests afterwards.

jtshannon
Автор

Have looked around in a lot of places for a great intro to TDD, this supersases them all. The breakdown of red-green-refactor is simple yet succint. Thank you, very much.

heyamjoe
Автор

How to TDD something like API request(post, put, etc)/DB write/read?

kamalhm-dev
Автор

This is an amazing explanation, thank you!

PixelTB
Автор

This was very clear and helpful! Thank you!

JumpPanda
Автор

great tutorial! thank you, will start to implement this method to my coding habit!

SuperBES
Автор

Couldn't we just run the adder function with these various inputs without using jest? What would be the difference?

iBen-rypj
Автор

Great and simple explanation. Thank you!

ashleypean
Автор

A simple question here. Can we call this style of testing Behavior Driven Development also?
Thanks in advance.

snakezize