What is the recommended way to test asynchronous Swift code using async/await in XCTest?
-
A
Use XCTestExpectation and waitForExpectations
-
B
Mark the test function as async and use await directly
-
C
Run the async code on a background thread with DispatchQueue
-
D
Use a semaphore to block until the async task completes