Skip to content

Commit 1586d5f

Browse files
committed
Improve README
1 parent 174f882 commit 1586d5f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff 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
)

0 commit comments

Comments
 (0)