Skip to content

Instantly share code, notes, and snippets.

@victorpanitz
Created August 17, 2020 00:26
Show Gist options
  • Save victorpanitz/82e9e898b14cde099e5a3e80507b58f6 to your computer and use it in GitHub Desktop.
Save victorpanitz/82e9e898b14cde099e5a3e80507b58f6 to your computer and use it in GitHub Desktop.
class FakeURLSession: URLSession {
static var tasksToBeReturned: [URLSessionTask] = []
@objc func _getAllTasks(completionHandler: @escaping ([URLSessionTask]) -> Void) {
completionHandler(Self.tasksToBeReturned)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment