You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.
Currently, when clauses contain actions. However, if there is an error in action creator (depends on how complex action creators you use), all tests fail. Since this library attempts at integration testing, we should probably include action creators. There are two syntax variants:
generator function: when('query is set', () => setQuery('Bridgeburners'));
spread: when('query is set', setQuery, 'Bridgeburners')
The advantage of using generator function is you can apply several actions at once. The question is whether you should. If we agree on one action per when clause, spread syntax seems more natural.
The text was updated successfully, but these errors were encountered:
I have decided for the spread operator since I like it a bit better (from redux-saga). There is even a way of applying multiple actions (use Array.isArray()).
Currently, when clauses contain actions. However, if there is an error in action creator (depends on how complex action creators you use), all tests fail. Since this library attempts at integration testing, we should probably include action creators. There are two syntax variants:
when('query is set', () => setQuery('Bridgeburners'));
when('query is set', setQuery, 'Bridgeburners')
The advantage of using generator function is you can apply several actions at once. The question is whether you should. If we agree on one action per when clause, spread syntax seems more natural.
The text was updated successfully, but these errors were encountered: