In this post, I’m going to show how you can leverage arrays in your mocks to write better quality and more readable unit tests that might help you catch bugs in your code that you didn’t even know existed.
Although I’m not going to cover in detail what mocks and unit tests are, it’s often useful to start with a quick zoom out.
Unit testing is a way in which we can test the behaviour and functionality of individual chunks of code.
For example, let’s say we have a
We might want…
Senior iOS Engineer at Kin + Carta Create EU