Skip to content

Commit

Permalink
remove commented test code
Browse files Browse the repository at this point in the history
  • Loading branch information
mltbnz committed Jan 15, 2025
1 parent f5c43c3 commit 8f7f5bf
Showing 2 changed files with 0 additions and 67 deletions.
Original file line number Diff line number Diff line change
@@ -586,6 +586,5 @@ struct AppFeatureTests {

// assert
await store.receive(\.map.focusNextRide)
// await store.receive(.set(\.$bottomSheetPosition, .relative(0.3)))
}
}
Original file line number Diff line number Diff line change
@@ -146,72 +146,6 @@ struct SettingsFeatureCoreTests {
}
}

// @MainActor
// func test_didSaveUserSettings_onRideEventSettingsChange() async throws {
// let didSaveUserSettings = LockIsolated(false)
// let testQueue = DispatchQueue.immediate
//
// let testClock = TestClock()
// let store = TestStore(
// initialState: SettingsFeature.State(),
// reducer: { SettingsFeature() },
// withDependencies: {
// $0.continuousClock = testClock
// $0.mainQueue = testQueue.eraseToAnyScheduler()
// $0.fileClient.save = { @Sendable _, _ in
// didSaveUserSettings.setValue(true)
// }
// $0.feedbackGenerator.selectionChanged = {}
// }
// )
//
// // act
// await store.send(.rideevent(.binding(.set(\.eventSearchRadius, .far))) {
// $0.rideEventSettings.eventSearchRadius = .far
// }
//
// await testClock.advance(by: .seconds(2))
// // assert
// didSaveUserSettings.withValue { val in
// XCTAssertTrue(val, "Expected that save is invoked")
// }
// }

// @MainActor
// func test_didSaveUserSettings_onAppearanceSettingsChange() async throws {
// let didSaveUserSettings = LockIsolated(false)
//
// let store = TestStore(
// initialState: SettingsFeature.State(
// userSettings: .init(
// appearanceSettings: .init(
// appIcon: .appIcon1,
// colorScheme: .light
// )
// )
// ),
// reducer: { SettingsFeature() }
// )
// let testClock = TestClock()
// store.dependencies.continuousClock = testClock
// store.dependencies.mainQueue = .immediate
// store.dependencies.fileClient.save = { @Sendable _, _ in
// didSaveUserSettings.setValue(true)
// }
//
// // act
// await store.send(.appearance(.set(\.$colorScheme, .dark))) {
// $0.appearanceSettings.colorScheme = .dark
// }
//
// await testClock.advance(by: .seconds(2))
// // assert
// didSaveUserSettings.withValue { val in
// XCTAssertTrue(val, "Expected that save is invoked")
// }
// await store.finish()
// }

@Test
func didSaveUserSettings_onSettingsChange() async throws {
@Shared(.userSettings)

0 comments on commit 8f7f5bf

Please sign in to comment.