Re:Ask HN: Do you write tests before the implementation?
by jackweirdy on Friday November 15, 2019 @11:29AM
(#21546182)
Keep in mind the test is written with the correct behaviour and annotated to be failing — in a hypothetical language and framework your test would be
@failing testDivZero() { assertEquals(None, div(1, 0)) }
This expresses both the intent and the reality
Obviously if you view tests differently (eg. as a declaration of current behavior rather than intended behavior) then my argument dies.