Settings

Theme

Ask HN: When do you guys start writing unit tests?

2 points by notadoctor_ssh 6 years ago · 2 comments · 1 min read


Do you guys follow TDD approach? If you guys do, at what point do you start writing test cases? Any advantages you found by following this approach?

bbody 6 years ago

Typically for any personal projects I will do it before any large refractors then keep on top of code coverage going forth. I find this approach let’s me move fast until I reach a level of seriousness.

I sometimes use TDD when adding new functionality, I even created a relatively popular YouTube video on the topic. I find it most useful when I’m coding a particularly complicated function, helps me think through the problem better.

RocketSyntax 6 years ago

I typically don't for my personal projects, but if I was going to publish my code or start collaborating in git it would move toward the top of my todo list.

Or if I started weaving together lots of different parts of the project.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection