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

nerv-test-utils的api:findRenderedDOMComponentWithClass问题 #165

Open
tibic opened this issue Jul 15, 2020 · 0 comments
Open

nerv-test-utils的api:findRenderedDOMComponentWithClass问题 #165

tibic opened this issue Jul 15, 2020 · 0 comments

Comments

@tibic
Copy link

tibic commented Jul 15, 2020

版本:

"nerv-devtools": "^1.5.7",
"nerv-test-utils": "^1.5.7",
"jest": "^25.1.0",

问题描述:

ReactTestUtils.findRenderedDOMComponentWithClass(wrapper,'.sp-alert_close_icon');
这个方法在查找元素时候,查不到,jest测试报错

image

查看源码

image

上图里面查找的result为空数组

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

No branches or pull requests

1 participant