wix-incubator / redux-testkit

Complete and opinionated testkit for testing Redux projects (reducers, selectors, actions, thunks)
MIT License
227 stars 20 forks source link

Unify top-API Styling #7

Closed d4vidi closed 7 years ago

d4vidi commented 7 years ago

Testing selectors and the reducers requires a stateless, static-form API (e.g. Redcuer(uut).doThisAndThat()), while for testing actions, a local instance should be created and reset in each test cycle (i.e. const actionTest = new ActionTest();, actionTest.dispatchSync(someAction), actionTest.reset()).

Users who learn how to use one sub-framework expect the others to work pretty much the same way. As long as that's not the case, the API might seem confusing to some.

I vote for unifying the API style to the latter ("worst-case") form.

talkol commented 7 years ago

Moved all API style discussion to #4