Skip to content

Commit

Permalink
Added test for find by display name
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonbernardes committed Dec 15, 2015
1 parent 7436279 commit bc4929b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/__tests__/ShallowWrapper-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,19 @@ describe('shallow', () => {
expect(wrapper.find(Foo).type()).to.equal(Foo);
});

it('should find a component based on a display name', () => {
class Foo extends React.Component {
render() { return <div />; }
}
const wrapper = shallow(
<div>
<Foo className="foo" />
</div>
);
expect(wrapper.find('Foo').type()).to.equal(Foo);
});


it('should find multiple elements based on a class name', () => {
const wrapper = shallow(
<div>
Expand Down

0 comments on commit bc4929b

Please sign in to comment.