From 3a2b7d7c748eb83882aaecfe5008e84964ae1796 Mon Sep 17 00:00:00 2001 From: AndreaRomani Date: Wed, 16 Aug 2023 18:29:09 +0200 Subject: [PATCH] Fix: deprecation warning on TestStore (#2378) --- Sources/ComposableArchitecture/TestStore.swift | 8 ++++---- .../Reducers/PresentationReducerTests.swift | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/ComposableArchitecture/TestStore.swift b/Sources/ComposableArchitecture/TestStore.swift index b7e84ce30f55..c9f8e29deb0e 100644 --- a/Sources/ComposableArchitecture/TestStore.swift +++ b/Sources/ComposableArchitecture/TestStore.swift @@ -543,7 +543,7 @@ public final class TestStore( - initialState: @autoclosure () -> State, + initialState: @autoclosure () -> R.State, @ReducerBuilder reducer: () -> R, withDependencies prepareDependencies: (inout DependencyValues) -> Void = { _ in }, @@ -581,7 +581,7 @@ public final class TestStore( - initialState: @autoclosure () -> State, + initialState: @autoclosure () -> R.State, @ReducerBuilder reducer: () -> R, observe toScopedState: @escaping (State) -> ScopedState, withDependencies prepareDependencies: (inout DependencyValues) -> Void = { _ in }, @@ -615,7 +615,7 @@ public final class TestStore( - initialState: @autoclosure () -> State, + initialState: @autoclosure () -> R.State, @ReducerBuilder reducer: () -> R, observe toScopedState: @escaping (State) -> ScopedState, send fromScopedAction: @escaping (ScopedAction) -> Action, @@ -656,7 +656,7 @@ public final class TestStore( - initialState: @autoclosure () -> State, + initialState: @autoclosure () -> R.State, @ReducerBuilder reducer: () -> R, withDependencies prepareDependencies: (inout DependencyValues) -> Void = { _ in }, diff --git a/Tests/ComposableArchitectureTests/Reducers/PresentationReducerTests.swift b/Tests/ComposableArchitectureTests/Reducers/PresentationReducerTests.swift index 9955d260a27b..f9541f862de0 100644 --- a/Tests/ComposableArchitectureTests/Reducers/PresentationReducerTests.swift +++ b/Tests/ComposableArchitectureTests/Reducers/PresentationReducerTests.swift @@ -2242,7 +2242,7 @@ final class PresentationReducerTests: BaseTCATestCase { } let mainQueue = DispatchQueue.test - let store = TestStore(initialState: Parent.State()) { + let store = TestStore(initialState: .init()) { Parent() } withDependencies: { $0.mainQueue = mainQueue.eraseToAnyScheduler()