Testing Escaping Closures in Swift
Testing synchronous and asynchronous algorithms with escaping closures
3 min readOct 15, 2022
Here’s a charade: I have two functions. Can you tell which one is synchronous and which one is asynchronous?
See below:
func doThis(_ closure: () -> Void) {
// …
}func doThat(_ closure: @escaping () -> Void)…