Skip to content

Commit

Permalink
[docs] add link to Cheerio API and another example
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisWren authored and ljharb committed Jan 3, 2017
1 parent 1f17805 commit caa1f49
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/api/render.md
Expand Up @@ -10,7 +10,7 @@ disservice.

For the purposes of this documentation, we will refer to Cheerio's constructor as
`CheerioWrapper`, which is to say that it is analogous to our `ReactWrapper` and `ShallowWrapper`
constructors.
constructors. You can reference the [Cheerio API docs](https://github.com/cheeriojs/cheerio#api) for methods available on a `CheerioWrapper` instance.

### Example Usage

Expand All @@ -30,6 +30,11 @@ describe('<Foo />', () => {
expect(wrapper.text()).to.contain('unique');
});

it('renders a div', () => {
const wrapper = render(<div className="myClass" />);
expect(wrapper.html()).to.contain('div');
});

it('can pass in context', () => {
function SimpleComponent(props, context) {
const { name } = context;
Expand Down

0 comments on commit caa1f49

Please sign in to comment.