/top/
/new/
/best/
/ask/
/show/
/job/
^
slacker news
login
about
←back to thread
Unit tests as documentation
(www.thecoder.cafe)
174 points
thunderbong
| 2 comments |
17 Oct 24 17:22 UTC
|
HN request time: 0.407s
|
source
Show context
mihaigalos
◴[
17 Oct 24 18:21 UTC
]
No.
41872231
[source]
▶
>>41871629 (OP)
#
In TDD, u-tests are called "spec". Pretty much sums it up.
replies(2):
>>41872337
#
>>41872778
#
1.
advisedwang
◴[
17 Oct 24 19:08 UTC
]
No.
41872778
[source]
▶
>>41872231
#
spec and documentation are things different though?
replies(1):
>>41877668
#
ID:
GO
2.
gpmcadam
◴[
18 Oct 24 09:24 UTC
]
No.
41877668
[source]
▶
>>41872778 (TP)
#
In TDD spec is converted to behaviours that can be ran as automated tests so if the logic of the code changes, it breaks the spec and in turn the tests
Whereas documentation can (inevitably) go stale with no feedback or build failures
↑