Skip to content

Commit

Permalink
Add tests for nested string and numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
smacker committed Feb 1, 2016
1 parent baddf12 commit f1e5b91
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/__tests__/ShallowWrapper-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,23 @@ describe('shallow', () => {
expect(wrapper.contains('1')).to.equal(false);
});

it('should work with nested strings & numbers', () => {
const wrapper = shallow(
<div>
<div>
<div>{5}</div>
</div>
<div>foo</div>
</div>
);

expect(wrapper.contains('foo')).to.equal(true);
expect(wrapper.contains(<div>foo</div>)).to.equal(true);

expect(wrapper.contains(5)).to.equal(true);
expect(wrapper.contains(<div>{5}</div>)).to.equal(true);
});

});

describe('.equals(node)', () => {
Expand Down

0 comments on commit f1e5b91

Please sign in to comment.