Remove testAction
The store unit tests had been refactored alongside Elements v2, by providing a new store mocking system, the FakeStore
. The main difference is that it becomes possible to call dispatch
inside of an action (nested actions), accessing getters, and generally emulating a store module instead of merely running a single function outside of its context. It also makes it easier to do assertions on the expected behavior and often has cleaner error messages.
It was planned to remove testAction when rewriting the tests for each store module whenever it is time to refactor it, however it is becoming harder to maintain the older store code as tests are hard to debug and we no longer really know how testAction used to work.
File | Count |
---|---|
test/store/elements.js |
4 |
test/store/entity.js |
8 |
test/store/image.js |
2 |
test/store/search.js |
3 |
test/testhelpers.js |
1 |
Stats generated using this one-liner:
git grep testAction | cut -d: -f1 | uniq -c | sed -E 's/([0-9]+) (.*)\s*$/`\2` | \1/;s/^\s*//'