Skip to content

Commit

Permalink
reset dispatched actions before mounting, to capture actions dispatch…
Browse files Browse the repository at this point in the history
…ed during mount
  • Loading branch information
Raice Hannay committed Feb 11, 2020
1 parent 81806d9 commit 9e8c3e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "Raice Hannay <voodoocreation@gmail.com>",
"description": "A set of classes to make setting up React components for unit tests easy.",
"license": "ISC",
"version": "2.0.0",
"version": "2.0.1",
"keywords": [
"component",
"enzyme",
Expand Down
2 changes: 1 addition & 1 deletion src/WrapperWithRedux.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default abstract class WrapperWithRedux<

// @ts-ignore
public mount = () => {
this.dispatchedActions = [];
this.beforeMount();

const props = this.defineProps() as P;
Expand Down Expand Up @@ -109,6 +110,5 @@ export default abstract class WrapperWithRedux<
super.reset();

this.scenarioReduxState = {};
this.dispatchedActions = [];
}
}

0 comments on commit 9e8c3e4

Please sign in to comment.