Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to test the Event creation? #56

Open
luziqin opened this issue May 27, 2019 · 0 comments
Open

How to test the Event creation? #56

luziqin opened this issue May 27, 2019 · 0 comments

Comments

@luziqin
Copy link

luziqin commented May 27, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant