DEV Community

Discussion on: What are your biggest problems with unit testing?

Collapse
 
bengreenberg profile image
Ben Greenberg

One issue with unit testing is the tendency to tie the test to the result of the code, not the code itself. In other words, testing that a markdown filter produces the actual content in your filesystem as intended. It's less intuitive, but more durable, to test the code against a mocked markdown file, in that case. Content may change at any moment, and it doing so shouldn't break the test, because the code has not changed.