Login
You're viewing the functional.cafe public feed.

Replies

  • 💬 0🔄 2⭐ 2
  • Nov 17, 2026, 1:00 PM

    @lascapi
    Your private function lives because of a test you wrote before writing the said function, to make the test to pass. So it is already tested.

    💬 1🔄 0⭐ 0
  • Nov 17, 2026, 4:27 PM

    @jeko Perfect reframing ! :ablobcatheart:

    But, sometimes my task is to improve legacy code (which is not tested by definition), and the temptation was big to try to test the private function. 🙊

    💬 1🔄 0⭐ 0
  • Nov 17, 2026, 4:46 PM

    @lascapi
    Of course ! Haha
    If you manage to test the public fonctions which call the private one instead, that would be a win.
    It might be a much bigger effort. So you make your trade off. It's OK ❤️

    💬 0🔄 0⭐ 0