Skip to content

Commit

Permalink
chore: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
forgotvas committed Jan 27, 2025
1 parent 77fdabc commit 435e2d8
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ final class CourseDownloadHelperTests: XCTestCase {
await helper.refreshValue()

// then
await Task.yield()
await fulfillment(of: [expectation], timeout: 1)
Verify(downloadManagerMock, .once, .getDownloadTasks())
Verify(downloadManagerMock, .once, .getCurrentDownloadTask())
Expand All @@ -177,7 +176,7 @@ final class CourseDownloadHelperTests: XCTestCase {
let deletedFileExpectation = expectation(description: "wait for deletedFile event")
let clearedAllExpectation = expectation(description: "wait for clearedAll event")

var expectations: [XCTestExpectation] = [
let expectations: [XCTestExpectation] = [
addedExpectation,
startedExpectation,
pausedExpectation,
Expand Down Expand Up @@ -208,7 +207,6 @@ final class CourseDownloadHelperTests: XCTestCase {
downloadPublisher.send(.clearedAll) //9
downloadPublisher.send(.progress(task)) //Helper shouldn't send event for that
// then
await Task.yield()
await fulfillment(of: expectations, timeout: 1)
Verify(downloadManagerMock, 9, .getDownloadTasks())
Verify(downloadManagerMock, 9, .getCurrentDownloadTask())
Expand All @@ -233,7 +231,6 @@ final class CourseDownloadHelperTests: XCTestCase {
// when
downloadPublisher.send(.progress(task))
// then
await Task.yield()
await fulfillment(of: [expectation], timeout: 1)
value.currentDownloadTask = task
XCTAssertEqual(helper.value, value)
Expand Down

0 comments on commit 435e2d8

Please sign in to comment.