Elektrine lite

← Feed

@phillmv@hachyderm.io

Post #1722061

2026-04-27 12:15 UTC

@AT1ST @brib @jneen this is why i trot to write tests that fail first. by writing a test with a mocked out implementation it helps clarify the design and fill in gaps i haven’t thought of yet. this is a lot easier in higher level langs tha lower ones

Replies (2)

  • @AT1ST@mstdn.ca 2026-04-27 18:50

    @phillmv @brib @jneen I think my biggest issue with "Write tests that fail first" is that, at the beginning of a project, *any* test is guaranteed to fail. Though I am also preferring Classical Testing over London Testing, because mocks make the opposite be a problem; a test can pass even if it actually shouldn't on actual stuff (I will admit I got there by starting with integration tests instead of unit tests.).

    Open ##1734329

  • @phillmv@hachyderm.io @AT1ST@mstdn.ca @brib@bribstodon.xyz @jneen@unstable.systems One can’t write the tests without first writing the API, and it’s often impossible to figure that out without having first written much of both the code that implements the API and the code that uses it. For mature projects, test-driven development makes more sense.

    Open ##2270885