Hacker News new | ask | show | jobs
by strogonoff 300 days ago
Tests are code. Code has bugs. More complex code has more bugs. The more complex your tests, the more bugs in your tests. Who tests the tests? It’s one thing if you rely on functionality provided by a stable testing framework, but I bet grug no like call stacks in own test code.
2 comments

> Who tests the tests?

To me it's a bit like double entry bookkeeping. Two layers is valuable, but there's rapidly diminishing returns beyond two.

Tests get implicitly tested by being run against code. When they fail in spite of the presence of no bugs then congratulations youve found a bug in your test.
What if a test passes as a result of the bug?
What I did say: tests get tested implicitly by the code they test.

What I didnt say: this catches 100% of all bugs in your tests.