You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge branch 'main' of github.com:square/workflow-swift into tomb/swiftui-testbed
* 'main' of github.com:square/workflow-swift:
Add WorkflowSwiftUIExperimental (#252)
Add convenience method for library definitions to reduce boilerplate (#251)
[release]: bump to version 3.4.0 (#250)
RxSwift 6.6 (#212)
Expose 'screen' on WorkflowHostingController (#246)
[fix]: address some RenderTester limitations with optionals (#245)
Resolved Swift 5.9 compilation warning related to UnsafeRawPointer object conversion (#243)
Bump activesupport from 6.1.7.3 to 6.1.7.6 (#242)
Copy file name to clipboardExpand all lines: WorkflowReactiveSwift/Testing/SignalProducerWorkflowTesting.swift
+5-21Lines changed: 5 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -21,43 +21,27 @@ import XCTest
21
21
@testableimport WorkflowReactiveSwift
22
22
23
23
extensionRenderTester{
24
-
/// Expect a `SignalProducer`.
24
+
/// Expect a `SignalProducer` with an optional output.
25
25
///
26
26
/// `SignalProducerWorkflow` is used to subscribe to `SignalProducer`s and `Signal`s.
27
27
///
28
28
/// ⚠️ N.B. If you are testing a case in which multiple `SignalProducerWorkflow`s are expected, **only one of them** may have a non-nil `producingOutput` parameter.
29
29
///
30
30
/// - Parameters:
31
+
/// - outputType: The `OutputType` of the expected `SignalProducerWorkflow`. Typically this will be correctly inferred by the type system, but may need to be explicitly specified if particular optionality is desired.
31
32
/// - producingOutput: An output that should be returned when this worker is requested, if any.
32
33
/// - key: Key to expect this `Workflow` to be rendered with.
33
34
publicfunc expectSignalProducer<OutputType>(
34
-
producingOutput output:OutputType?=nil,
35
-
key:String="",
36
-
file:StaticString= #file, line:UInt= #line
37
-
)->RenderTester<WorkflowType>{
38
-
expectWorkflow(
39
-
type: SignalProducerWorkflow<OutputType>.self,
40
-
key: key,
41
-
producingRendering:(),
42
-
producingOutput: output,
43
-
assertions:{ _ in}
44
-
)
45
-
}
46
-
47
-
/// Expect a `SignalProducer` with the specified `outputType` that produces no `Output`.
48
-
///
49
-
/// - Parameters:
50
-
/// - outputType: The `OutputType` of the expected `SignalProducerWorkflow`.
51
-
/// - key: Key to expect this `Workflow` to be rendered with.
0 commit comments