Skip to content
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

Merged
merged 1 commit into from
Jun 11, 2019
Merged

hooks testcase written #2029

merged 1 commit into from
Jun 11, 2019

Conversation

kii-dot
Copy link
Contributor

@kii-dot kii-dot commented Mar 3, 2019

Test cases written to test useState and useEffect

@kii-dot kii-dot mentioned this pull request Mar 3, 2019
14 tasks
@kii-dot
Copy link
Contributor Author

kii-dot commented Mar 5, 2019

@ljharb

Copy link

@pgangwani pgangwani left a 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" }); });

@kii-dot
Copy link
Contributor Author

kii-dot commented Mar 6, 2019

@pgangwani Sounds like a plan

Copy link
Member

@ljharb ljharb left a 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.

packages/enzyme-test-suite/test/ReactWrapper-spec.jsx Outdated Show resolved Hide resolved
packages/enzyme-test-suite/test/ReactWrapper-spec.jsx Outdated Show resolved Hide resolved
packages/enzyme-test-suite/test/ReactWrapper-spec.jsx Outdated Show resolved Hide resolved
packages/enzyme-test-suite/test/ReactWrapper-spec.jsx Outdated Show resolved Hide resolved
packages/enzyme-test-suite/test/ReactWrapper-spec.jsx Outdated Show resolved Hide resolved
packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx Outdated Show resolved Hide resolved
packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx Outdated Show resolved Hide resolved
packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx Outdated Show resolved Hide resolved
packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx Outdated Show resolved Hide resolved
packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx Outdated Show resolved Hide resolved
@ljharb ljharb mentioned this pull request Mar 7, 2019
7 tasks
@ljharb ljharb added this to Lifecycles in React 16 Mar 7, 2019
@ljharb ljharb moved this from Lifecycles to v16.8+: Hooks in React 16 Mar 7, 2019
@kii-dot
Copy link
Contributor Author

kii-dot commented Mar 9, 2019

@pgangwani @ljharb I've added the component will receive props test case. Let me know if there are any other changes

@pgangwani
Copy link

@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.

@ljharb ljharb merged commit 01d2fda into enzymejs:master Jun 11, 2019
@kii-dot kii-dot deleted the hooksTestCases branch August 30, 2019 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
React 16
  
v16.8+: Hooks
Development

Successfully merging this pull request may close these issues.

None yet

3 participants