Skip to content

hooks testcase written#2029

Merged
ljharb merged 1 commit into
enzymejs:masterfrom
kii-dot:hooksTestCases
Jun 11, 2019
Merged

hooks testcase written#2029
ljharb merged 1 commit into
enzymejs:masterfrom
kii-dot:hooksTestCases

Conversation

@kii-dot

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

Copy link
Copy Markdown
Contributor

Test cases written to test useState and useEffect

@kii-dot kii-dot mentioned this pull request Mar 3, 2019
14 tasks
@kii-dot

kii-dot commented Mar 5, 2019

Copy link
Copy Markdown
Contributor Author

@ljharb

@pgangwani pgangwani left a comment

Copy link
Copy Markdown

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

kii-dot commented Mar 6, 2019

Copy link
Copy Markdown
Contributor Author

@pgangwani Sounds like a plan

@ljharb ljharb left a comment

Copy link
Copy Markdown
Member

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.

Comment thread packages/enzyme-test-suite/test/ReactWrapper-spec.jsx Outdated
Comment thread packages/enzyme-test-suite/test/ReactWrapper-spec.jsx Outdated
Comment thread packages/enzyme-test-suite/test/ReactWrapper-spec.jsx Outdated
Comment thread packages/enzyme-test-suite/test/ReactWrapper-spec.jsx Outdated
Comment thread packages/enzyme-test-suite/test/ReactWrapper-spec.jsx Outdated
Comment thread packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx Outdated
Comment thread packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx Outdated
Comment thread packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx Outdated
Comment thread packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx Outdated
Comment thread packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx Outdated
@ljharb ljharb mentioned this pull request Mar 7, 2019
7 tasks
@kii-dot

kii-dot commented Mar 9, 2019

Copy link
Copy Markdown
Contributor Author

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

@pgangwani

Copy link
Copy Markdown

@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

None yet

Development

Successfully merging this pull request may close these issues.

3 participants