Skip to content

Commit

Permalink
Enable async test for cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Feb 14, 2024
1 parent bc220aa commit 285cd7f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Tests/KingfisherTests/KingfisherManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,15 @@ class KingfisherManagerTests: XCTestCase {
waitForExpectations(timeout: 3, handler: nil)
}

// func testRetrieveImageCancelAsync() async throws {
// let url = testURLs[0]
// let stub = delayedStub(url, data: testImageData, length: 123)
//
// let checker = CallingChecker()
// try await checker.checkCancelBehavior(stub: stub) {
// _ = try await self.manager.retrieveImage(with: url)
// }
// }
func testRetrieveImageCancelAsync() async throws {
let url = testURLs[0]
let stub = delayedStub(url, data: testImageData, length: 123)

let checker = CallingChecker()
try await checker.checkCancelBehavior(stub: stub) {
_ = try await self.manager.retrieveImage(with: url)
}
}

func testSuccessCompletionHandlerRunningOnMainQueueByDefault() {
let progressExpectation = expectation(description: "progressBlock running on main queue")
Expand Down

0 comments on commit 285cd7f

Please sign in to comment.