Skip to content

Commit

Permalink
Remove flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yalishanda42 committed May 30, 2023
1 parent 73a7210 commit fa57765
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,6 @@ final class SearchStationDomainTests: XCTestCase {
XCTAssertEqual(calls, 1)
}

func test_locationAction_whenAvailable_opensStationInfo() async throws {
let station = BGStation.dobrich
let store = TestStore(
initialState: SearchStationReducer.State(
locationStatus: .authorized(nearestStation: station)
),
reducer: SearchStationReducer()
)

store.exhaustivity = .off

await store.send(.locationAction)
await store.receive(.selectStation(station))
}

func test_locationAction_whenConnectionFailed_refreshes() async throws {
let serviceSpy = Spy()
let store = TestStore(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,29 +132,6 @@ final class StationDomainTests: XCTestCase {
}
}

func test_task_sendsTickEverySecond() async throws {
let clock = TestClock()
let store = TestStore(
initialState: .init(
station: .sofia
),
reducer: StationReducer()
) {
$0.continuousClock = clock
}

store.exhaustivity = .off

let task = await store.send(.task)

for _ in 1...10 {
await clock.advance(by: .seconds(1))
await store.receive(.tick)
}

await task.cancel() // done by SwiftUI
}

func test_tick_refreshesWhenInDifferrentMinute() async throws {
let dateInNextMinute = Date(timeIntervalSinceReferenceDate: 61)

Expand Down

0 comments on commit fa57765

Please sign in to comment.