Skip to content

Commit 9e8c3e4

Browse files
author
Raice Hannay
committed
reset dispatched actions before mounting, to capture actions dispatched during mount
1 parent 81806d9 commit 9e8c3e4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"author": "Raice Hannay <[email protected]>",
44
"description": "A set of classes to make setting up React components for unit tests easy.",
55
"license": "ISC",
6-
"version": "2.0.0",
6+
"version": "2.0.1",
77
"keywords": [
88
"component",
99
"enzyme",

src/WrapperWithRedux.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export default abstract class WrapperWithRedux<
4545

4646
// @ts-ignore
4747
public mount = () => {
48+
this.dispatchedActions = [];
4849
this.beforeMount();
4950

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

111112
this.scenarioReduxState = {};
112-
this.dispatchedActions = [];
113113
}
114114
}

0 commit comments

Comments
 (0)