Skip to content

Commit

Permalink
[Docs] clean up linting errors in misc markdown files
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jun 17, 2017
1 parent 6bf1c12 commit 2d1fba5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,19 @@ describe('<MyComponent />', () => {
});

it('renders children when passed in', () => {
const wrapper = shallow(
const wrapper = shallow((
<MyComponent>
<div className="unique" />
</MyComponent>
);
));
expect(wrapper.contains(<div className="unique" />)).to.equal(true);
});

it('simulates click events', () => {
const onButtonClick = sinon.spy();
const wrapper = shallow(
const wrapper = shallow((
<Foo onButtonClick={onButtonClick} />
);
));
wrapper.find('button').simulate('click');
expect(onButtonClick).to.have.property('callCount', 1);
});
Expand Down Expand Up @@ -144,9 +144,9 @@ describe('<Foo />', () => {

it('simulates click events', () => {
const onButtonClick = sinon.spy();
const wrapper = mount(
const wrapper = mount((
<Foo onButtonClick={onButtonClick} />
);
));
wrapper.find('button').simulate('click');
expect(onButtonClick).to.have.property('callCount', 1);
});
Expand Down
12 changes: 4 additions & 8 deletions docs/common-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Please see the guide for [webpack](/docs/guides/webpack) to ensure your configur
- [Related Github issue](https://github.com/airbnb/enzyme/issues/684)
- [Related code](https://github.com/airbnb/enzyme/blob/3aeb02461eabf2fd402613991915d8d6f4b88536/src/react-compat.js#L97-L105)

###### Reason
###### Reason

In order to properly support multiple versions of React, we have conditional requirements that npm does not support with tools like
`peerDependencies`. Instead we manually require and throw errors if the dependency is not met.
Expand All @@ -42,10 +42,10 @@ Install a matching version of React for `react-test-utils`. Example package.json

### Query Selector fails

###### Reason
###### Reason

This could be due to a regression, or the feature is not yet implemented. If you are wanting to use a
certain query syntax, make sure it is implemented first before raising an issue. Here is the list of
certain query syntax, make sure it is implemented first before raising an issue. Here is the list of
selectors we currently support: https://github.com/airbnb/enzyme/blob/master/docs/api/selector.md

### Testing third party libraries
Expand Down Expand Up @@ -75,15 +75,11 @@ import ThirdPartyPortalLibrary from 'someplace';

class Comp extends React.Component {
render() {
return <ThirdPartyPortalLibrary ref={node => this.portal = node}>
return <ThirdPartyPortalLibrary ref={(node) => { this.portal = node; }} />;
}
}

const wrapper = mount(<Comp />);
const portal = wrapper.instance().portal;
// assert on `portal`
```




0 comments on commit 2d1fba5

Please sign in to comment.