Time Traveling in Swift Unit Tests
medium.comA lot of code that we write relies on the current date in some way, whether it’s cache invalidation, handling time sensitive data, or keeping track of durations. However, writing tests against code that uses such date comparisons can sometimes be a bit tricky.
Read more...