Patching - nothing to do with Pirates, but also Scary
April 20, 2025 | Reading Time: 6 min
I always find patching one of the most difficult aspects of writing good code tests, so I wanted to share some tips and tricks on patching and some particular ‘gotchas’ that can be confusing to deal with. What is patching? Why would I want to do this? When we write tests, we might call function a which calls some other function b, and we don’t necessarily want to test the correctness of function b or call function b at all.