You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TLDR: Is it possible to have an async XCTest method which also uses ViewInspector (e.g. func test...() async { let exp = view.inspect.inspection }?
More details:
I'm attempting to write tests that call async/await methods which eventually will influence a specific View I'm trying to test. Following the ViewInspector examples, I've been using the Inspection setup, which works great normally. However, whenever I mark a test as async it does not work as can be seen in the contrived examples below. Obviously in these examples I don't call any methods in the test body that actually use await, but I didn't include that as the expectations fails regardless of that fact; I can't even attach async to a test method with a ViewInspector expectation and have it work. Of note, I don't run into this problem if I use a simple XCTExpectation directly. Those can handle both async/await and expectations in a single test method.
TLDR: Is it possible to have an async XCTest method which also uses ViewInspector (e.g.
func test...() async { let exp = view.inspect.inspection }
?More details:
I'm attempting to write tests that call async/await methods which eventually will influence a specific View I'm trying to test. Following the ViewInspector examples, I've been using the Inspection setup, which works great normally. However, whenever I mark a test as async it does not work as can be seen in the contrived examples below. Obviously in these examples I don't call any methods in the test body that actually use
await
, but I didn't include that as the expectations fails regardless of that fact; I can't even attach async to a test method with a ViewInspector expectation and have it work. Of note, I don't run into this problem if I use a simple XCTExpectation directly. Those can handle both async/await and expectations in a single test method.Example:
The text was updated successfully, but these errors were encountered: