Skip to content

Commit

Permalink
improve Enzyme return types
Browse files Browse the repository at this point in the history
  • Loading branch information
Raice Hannay committed Dec 12, 2019
1 parent 30fcaa1 commit 0539064
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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": "1.0.6",
"version": "1.0.7",
"keywords": [
"component",
"enzyme",
Expand Down
6 changes: 3 additions & 3 deletions src/Wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class Wrapper<
this.beforeMount();

const props = this.defineProps() as P;
const wrapper = mount<C>(<this.Component {...props} />, {
const wrapper = mount<P>(<this.Component {...props} />, {
wrappingComponent: this.WrappingComponent
});

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

const props = this.defineProps() as P;
const wrapper = render(
const wrapper = render<P, React.ComponentState>(
this.WrappingComponent ? (
<this.WrappingComponent>
<this.Component {...props} />
Expand All @@ -86,7 +86,7 @@ export default class Wrapper<
this.beforeMount();

const props = this.defineProps() as P;
const wrapper = shallow(
const wrapper = shallow<P>(
this.WrappingComponent ? (
<this.WrappingComponent>
<this.Component {...props} />
Expand Down

0 comments on commit 0539064

Please sign in to comment.