Skip to content

Commit c1a451d

Browse files
author
angu
committed
MOD extending the test_should_pass_AsyncAssertThrows about evaluation of the thrown error
1 parent f305e01 commit c1a451d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Tests/SwiftAsyncAssertTests/SwiftAsyncAssertTests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ final class SwiftAsyncAssertTests: XCTestCase {
107107
}
108108

109109
func test_should_pass_AsyncAssertThrows() async throws {
110-
await AsyncAssertThrowsError(try await throwingExpr { throw TestingError.systemFailedToWork })
110+
await AsyncAssertThrowsError(try await throwingExpr { throw TestingError.systemFailedToWork }) { error in
111+
XCTAssertEqual(error as? TestingError, .systemFailedToWork)
112+
}
111113
}
112114

113115
func test_should_pass_AsyncAssertNotThrows() async throws {

0 commit comments

Comments
 (0)