piotrwitek / typesafe-actions

Typesafe utilities for "action-creators" in Redux / Flux Architecture
https://codesandbox.io/s/github/piotrwitek/typesafe-actions/tree/master/codesandbox
MIT License
2.41k stars 98 forks source link

Jest Unit Testing #219

Open refucktor opened 4 years ago

refucktor commented 4 years ago

I already checked your community chat and noticed someone already asked something similar without any answers. That's why I'm posting my question here.

Is there any strategy or example for unit testing the actions? Using a library like redux-mock-store we can mock store and dispatch actions which makes the unit testing quite easy. Unfortunately while testing the actions created with your library the matchers failed due to Symbols comparisons and etc.

Would anybody be so kind to post an example or at least point to an example....

Thank you very much in advance!