Skip to content

Commit

Permalink
[Docs] Fix matchesElement examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jgzuke authored and ljharb committed Sep 11, 2018
1 parent ac35c19 commit ca054b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/api/ReactWrapper/matchesElement.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ render tree.

#### Example


<!-- eslint-disable react/button-has-type -->
```jsx
class MyComponent extends React.Component {
constructor(props) {
Expand All @@ -39,8 +39,8 @@ class MyComponent extends React.Component {
}

const wrapper = mount(<MyComponent />);
expect(wrapper.matchesElement(<div>Hello</div>)).to.equal(true);
expect(wrapper.matchesElement(<div className="foo bar">Hello</div>)).to.equal(true);
expect(wrapper.children().matchesElement(<button>Hello</button>)).to.equal(true);
expect(wrapper.children().matchesElement(<button className="foo bar">Hello</button>)).to.equal(true);
```


Expand Down
6 changes: 3 additions & 3 deletions docs/api/ShallowWrapper/matchesElement.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ render tree.

#### Example


<!-- eslint-disable react/button-has-type -->
```jsx
class MyComponent extends React.Component {
constructor(props) {
Expand All @@ -39,8 +39,8 @@ class MyComponent extends React.Component {
}

const wrapper = shallow(<MyComponent />);
expect(wrapper.matchesElement(<div>Hello</div>)).to.equal(true);
expect(wrapper.matchesElement(<div className="foo bar">Hello</div>)).to.equal(true);
expect(wrapper.matchesElement(<button>Hello</button>)).to.equal(true);
expect(wrapper.matchesElement(<button className="foo bar">Hello</button>)).to.equal(true);
```


Expand Down

0 comments on commit ca054b9

Please sign in to comment.