File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,11 @@ assert(
3333 scheduler.advance (by : .seconds (5 ))
3434 }
3535
36- Send (action : .anotherAction (.stopSomething ))
36+ Send (action : .anotherAction (.stopSomething )) { expectedStateChange in
37+ // if during Send or Receive action, your state is expected to mutate, you must indicate which change is expected to happen here:
38+ expectedStateChange.somePropertyShouldHaveChangedTo = true
39+ // any unexpected state mutation will fail the test, as well as any expected state mutation that doesn't occur, will also fail the test
40+ }
3741
3842 SideEffectResult {
3943 scheduler.advance (by : .seconds (5 ))
@@ -48,6 +52,10 @@ assert(
4852 } else {
4953 return false
5054 }
55+ } stateChange : { expectedStateChange in
56+ // if during Send or Receive action, your state is expected to mutate, you must indicate which change is expected to happen here:
57+ expectedStateChange.somePropertyShouldHaveChangedTo = true
58+ // any unexpected state mutation will fail the test, as well as any expected state mutation that doesn't occur, will also fail the test
5159 }
5260 }
5361)
You can’t perform that action at this time.
0 commit comments