Skip to content

Commit

Permalink
[Docs] ReactWrapper: fix .text() example
Browse files Browse the repository at this point in the history
  • Loading branch information
jorrit-g authored and ljharb committed Nov 24, 2017
1 parent 2dce2f3 commit 57fffb4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/api/ReactWrapper/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ expect(wrapper.text()).to.equal('important');
```

```jsx
const wrapper = mount(<div><Foo /><b>important</b></div>);
expect(wrapper.text()).to.equal('<Foo />important');
function Foo() {
return <div>This is</div>;
}

const wrapper = mount(<div><Foo /> <b>really</b> important</div>);
expect(wrapper.text()).to.equal('This is really important');
```


Expand Down

0 comments on commit 57fffb4

Please sign in to comment.