A nice tutorial by Martin Lasek about testing Vapor apps.
This article, similar to Martin's above, goes into a bit more detail on XCTest. It also encourages taking a different approach to testing web apps, focusing on exercising your routes (HTTP requests and responses) more than single components. Of course, it comes with an introduction to testing Swift code in general.
This article focuses more on how to test network calls in an iOS environment. However, the concepts are generic enough to be applied for anything and independently of the platform you're running on.
This may not be the kind of time travel you're hoping for. When testing code that relies on Dates, you may stumble upon simple but annoying problems. John Sundell writes about this topic, explaining how you can ensure reliability in your tests.
Another problem often encountered in tests is that, as your codebase grows and evolves, some of your tests may become "flaky," meaning they might "randomly" fail. How do we solve that? John Sundell writes about how to do it.