RxFeedback.swift
RxFeedback.swift copied to clipboard
How to test the Event creation?
I find that it is hard to test the event creation.For example i want to query some every 10s.And i write this in
viewDidLoad
method.I'm wandoring how to test the request produce and the event created in the right way?
let query: (Driver<State>) -> Signal<Event> = react(
request: {state -> QueryRequest? in
....
return QueryRequest()
},
effects: {request in
return Signal.just(Event.query)
})
Driver<Any>.system(
initialState: State(),
reduce: State.reduce,
feedback: query
)
.drive()
.disposed(by: self.rx.disposeBag)
It seams the only way is run the app and debug.So, is anyone has the same problem as me?