Reputation: 2188
This is what my jsx file contains,
{' '+this.props.file.attached.name}
How can I write test for this name
?
Upvotes: 2
Views: 337
Reputation: 2188
expect(wrapper.containsMatchingElement([<div class="attachedFile"><i class="fa fa-file-image-o"></i> apple</div>])).to.equal(true);
This works perfect,ensure that you surround the elements with []
Upvotes: 1