We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Our codebase has instances of common components that you can assign className to that is passed to their root components, like:
className
const Foo = ({ className }) => <div className={className}>Hello</div> const wrapper = mount(<div><Foo/></div>) expect(wrapper.find('.foo').length).toBe(1) //actually returns 2
Is this expected behavior? Since real CSS selectors are being used I figured that className should really only apply to native DOM elements.
The text was updated successfully, but these errors were encountered:
This is expected with Enzyme 3, you can use hostNodes to filter out composite components or use a more specific query like div.foo. See #1179
hostNodes
div.foo
Sorry, something went wrong.
great, thanks!
No branches or pull requests
Our codebase has instances of common components that you can assign
className
to that is passed to their root components, like:Is this expected behavior? Since real CSS selectors are being used I figured that
className
should really only apply to native DOM elements.The text was updated successfully, but these errors were encountered: