-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hooks testcase written #2029
hooks testcase written #2029
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@k3ithl1m : Could you please add testcase to simulate wrapper.setProps() to get new initial state from props (simulate to test concepts : getDerivedStateFromProps or componentWillReceiveProps) passing initialFooVal
act(() => { wrapper.setProps({ initialFooVal: "HELLO" }); });
@pgangwani Sounds like a plan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is a great start.
@pgangwani @ljharb I've added the component will receive props test case. Let me know if there are any other changes |
@k3ithl1m there is #2041 also open. Lets wait for it getting merged then I would work with you ( and whoever else intrested) to implement all remaining test cases specifically for react hooks. |
40cc703
to
0a17404
Compare
Test cases written to test useState and useEffect