Albeit true, I want to note that some languages encourage such practices way more than others do. Also, when you’ve got a hammer everything looks like a string nail.
In my mind a simple unit test should have caught this. Mock out the call to the service that sends the message and verify that it’s been called with the correct message, and cover the possible failure scenarios. That said I hate loosely typed languages lol.
Albeit true, I want to note that some languages encourage such practices way more than others do. Also, when you’ve got a hammer everything looks like a
stringnail.In my mind a simple unit test should have caught this. Mock out the call to the service that sends the message and verify that it’s been called with the correct message, and cover the possible failure scenarios. That said I hate loosely typed languages lol.