Skip to content

Commit 8247f31

Browse files
stephencelisjunebash
authored andcommitted
Don't disable _printChanges() in tests (pointfreeco#1995)
* Don't disable `_printChanges()` in tests It can be handy to have this logging during a test, so let's not go out of our way to suppress it. * Update DebugReducer.swift
1 parent bf7ad1d commit 8247f31

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Sources/ComposableArchitecture/Reducer/Reducers/DebugReducer.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,12 @@ public struct _PrintChangesReducer<Base: Reducer>: Reducer {
6161
self.printer = printer
6262
}
6363

64-
@usableFromInline
65-
@Dependency(\.context) var context
66-
6764
@inlinable
6865
public func reduce(
6966
into state: inout Base.State, action: Base.Action
7067
) -> Effect<Base.Action> {
7168
#if DEBUG
72-
if self.context != .test, let printer = self.printer {
69+
if let printer = self.printer {
7370
let oldState = state
7471
let effects = self.base.reduce(into: &state, action: action)
7572
return effects.merge(

0 commit comments

Comments
 (0)