-
-
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
Contains #153
Comments
whoa. I'd call that a bug. |
workarounds: // fails like expected
const expectedChildren = [
<span>bye</span>,
<div>Goodbye</div>
];
t.deepEqual(wrapper2.props().children, expectedChildren, 'should render children'); // Passing
t.ok(wrapper2.contains(<span>Hello</span>), 'should render children');
t.ok(wrapper2.contains(<div>Goodbye</div>), 'should render children'); Maybe it's fine that contains only accepts single nodes? |
@SeeThruHead Yeah. I'm not sure what contains would actually do when passed an array... I don't think the case is ever handled specifically so I'm not sure what it actually does in that case. |
Looks like it will try to compare the array to every node using nodeEqual from './Utils' I'll take a look at it later to see if I can figure out why nodeEqual(Array, Node) is passing. |
@SeeThruHead I believe I've fixed this ^^. Thanks for reporting the bug! |
Awesome thanks a lot @lelandrichardson |
I kinda was expecting this to not pass
Any thoughts?
The text was updated successfully, but these errors were encountered: