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.
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.