Re:Programmers Should Never Trust Anyone, Not Even Themselves
by throwaway2037 on Friday July 05, 2024 @03:48AM
(#40880600)
Don't be ashamed of this. I am a veteran of automated testing (writing automated unit tests for 10+ years). I am constantly disappointed in myself how bloody complicated it is to test some "simple code". And, then I go back and look at old unit tests from a few months ago: "Who wrote this shit!? <git blame> Oh, me."
All those mocks, and other Jest code, all seem overly complicated but I don't know of anything "better".