Skip to content

Commit 0539064

Browse files
author
Raice Hannay
committed
improve Enzyme return types
1 parent 30fcaa1 commit 0539064

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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": "1.0.6",
6+
"version": "1.0.7",
77
"keywords": [
88
"component",
99
"enzyme",

src/Wrapper.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default class Wrapper<
5454
this.beforeMount();
5555

5656
const props = this.defineProps() as P;
57-
const wrapper = mount<C>(<this.Component {...props} />, {
57+
const wrapper = mount<P>(<this.Component {...props} />, {
5858
wrappingComponent: this.WrappingComponent
5959
});
6060

@@ -67,7 +67,7 @@ export default class Wrapper<
6767
this.beforeMount();
6868

6969
const props = this.defineProps() as P;
70-
const wrapper = render(
70+
const wrapper = render<P, React.ComponentState>(
7171
this.WrappingComponent ? (
7272
<this.WrappingComponent>
7373
<this.Component {...props} />
@@ -86,7 +86,7 @@ export default class Wrapper<
8686
this.beforeMount();
8787

8888
const props = this.defineProps() as P;
89-
const wrapper = shallow(
89+
const wrapper = shallow<P>(
9090
this.WrappingComponent ? (
9191
<this.WrappingComponent>
9292
<this.Component {...props} />

0 commit comments

Comments
 (0)