Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

Use action creators inside when clauses #9

Closed
tomvej opened this issue May 18, 2017 · 2 comments
Closed

Use action creators inside when clauses #9

tomvej opened this issue May 18, 2017 · 2 comments
Assignees

Comments

@tomvej
Copy link
Contributor

tomvej commented May 18, 2017

See #8 . The interface should be the following:

when('text', actionCreator, ...params);

and optionally:

when('text', [actionCreator, ...params], [actionCreator, ...params], ...);

They can be recognized by Array.isArray(). Still, I am considering leaving out the latter.

@tomvej tomvej self-assigned this May 18, 2017
tomvej added a commit that referenced this issue May 21, 2017
@tomvej
Copy link
Contributor Author

tomvej commented May 21, 2017

Mostly works. There is still one small problem: Tests. Since when internally uses skipDependentTests from mochaHelpers -- and I want to test it is called when an error occurs. In order to do so, I'd have either to:

  1. Mock skipDependentTests which I cannot do without exporting it within object.
  2. Make skipDependentTests a parameter of an internal implementation of when.

@tomvej
Copy link
Contributor Author

tomvej commented May 21, 2017

I am going to close this issue and do something with tests in #12

@tomvej tomvej closed this as completed May 21, 2017
@tomvej tomvej reopened this May 21, 2017
@tomvej tomvej closed this as completed May 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant