This is a limitation of the current compiler and XCTest's APIs. XCTest's assertions only take auto closures, which aren't marked async, and so you can't use async APIs in them directly. If the 306 amendment is accepted, XCTest could update with async overloads of the assertions, which we could see in a month or two.
2 Likes