• mortalic@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    3 days ago

    TDD gives new code and new devs working on the code base a safety net. Yes. You should always use TDD. Imagine writing a test that says, deploy button. Is button gray.

    It returns false. Because the code doesn’t even exist yet.

    You write the code that shows a button. You set the button color to gray. The test now passes.

    Now expand that to every piece of code your team writes, require them all to pass before a PR can merge a branch and you’ve got a massive safety net.