top | item 38877564

(no title)

loxdalen | 2 years ago

I am confused about the example with the 'Greeting' function breaking the test. Did the author see this as an issue with testing?

If the functionality is changed, the tests will have to be changed to reflect that. One feature of tests is that they are are documentation for the expected functionality of code, so naturally it needs to be updated when functionality changes. It is a feature in my opinion.

discuss

order

brundolf|2 years ago

Yeah, the idea isn't that this type of code should never be tested but that it's a higher burden to test, and maybe less valuable to test, compared with other code. And that should be factored into the decision (and there should be a decision) on whether or not to test it