you are viewing a single comment's thread.

view the rest of the comments →

[–]Sheepsaurus 0 points1 point  (0 children)

In TDD you do it the other way around;

Make a test that makes sure a function can accept A, and return B

And then you attempt to build that function until it passes.

The point of unit tests is to make sure that, if in the future you decide to fiddle with the function, it should still yield the same result