Slide 17
Slide 17 text
The Composable Architecture (TCA)
Easy to find the non-matched changes from log
17
func testLoginButtonTapped() async throws {
let store = TestStore(
initialState: Login.State(isLoading: false),
reducer: Login()
)
await store.send(.loginButtonTapped, assert: {
$0.isLoading = true
})
}
testLoginButtonTapped(): A state change does not match expectation: ...
− Login.State(isLoading: false)
+ Login.State(isLoading: true)
(Expected: −, Actual: +)