Skip to content

Commit

Permalink
[Dev Deps] update babel-preset-airbnb, chai, eslint, `eslint-co…
Browse files Browse the repository at this point in the history
…nfig-airbnb`, `eslint-plugin-import`, `eslint-plugin-react`, `mocha`, `sinon`
  • Loading branch information
ljharb committed Aug 15, 2017
1 parent 45454b2 commit 8ffeeb1
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 74 deletions.
4 changes: 1 addition & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
"node": true,
"mocha": true
},
"ecmaFeatures": {
"jsx": true
},
"rules": {
"id-length": 0,
"new-cap": [2, { "capIsNewExceptions": ["AND"] }],
"react/jsx-pascal-case": [2, { "allowAllCaps": true }],
"react/no-find-dom-node": 1,
"no-underscore-dangle": [2, {
"allowAfterThis": true,
"allow": [
Expand Down
7 changes: 3 additions & 4 deletions docs/api/ReactWrapper/tap.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ const result = mount((
<li>yyy</li>
<li>zzz</li>
</ul>
))
.find('li')
.tap(n => console.log(n.debug()))
.map(n => n.text());
)).find('li')
.tap(n => console.log(n.debug()))
.map(n => n.text());
```
7 changes: 3 additions & 4 deletions docs/api/ShallowWrapper/tap.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ const result = shallow((
<li>yyy</li>
<li>zzz</li>
</ul>
))
.find('li')
.tap(n => console.log(n.debug()))
.map(n => n.text());
)).find('li')
.tap(n => console.log(n.debug()))
.map(n => n.text());
```
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,22 @@
"babel-eslint": "^7.2.3",
"babel-loader": "^6.4.1",
"babel-plugin-transform-replace-object-assign": "^0.2.1",
"babel-preset-airbnb": "^2.3.3",
"babel-preset-airbnb": "^2.4.0",
"babel-register": "^6.24.1",
"chai": "^4.0.2",
"chai": "^4.1.1",
"coveralls": "^2.13.1",
"create-react-class": "^15.6.0",
"enzyme-example-jest": "^0.1.0",
"enzyme-example-karma": "^0.1.1",
"enzyme-example-karma-webpack": "^0.1.4",
"enzyme-example-mocha": "^0.1.0",
"enzyme-example-react-native": "^0.1.0",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^15.0.1",
"eslint-plugin-import": "^2.6.0",
"eslint": "^4.4.1",
"eslint-config-airbnb": "^15.1.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^5.0.3",
"eslint-plugin-markdown": "^1.0.0-beta.6",
"eslint-plugin-react": "^7.1.0",
"eslint-plugin-react": "^7.2.1",
"gitbook-cli": "^1.0.1",
"in-publish": "^2.0.0",
"istanbul": "^1.0.0-alpha.2",
Expand All @@ -101,12 +101,12 @@
"karma-mocha": "^1.3.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.8.1",
"mocha": "^3.4.2",
"mocha": "^3.5.0",
"react": "0.13.x || 0.14.x || ^15.0.0-0 || 15.x",
"rimraf": "^2.6.1",
"safe-publish-latest": "^1.1.1",
"sinon": "^2.3.5",
"webpack": "^1.13.3",
"react": "0.13.x || 0.14.x || ^15.0.0-0 || 15.x"
"sinon": "^2.4.1",
"webpack": "^1.13.3"
},
"peerDependencies": {
"react": "0.13.x || 0.14.x || ^15.0.0-0 || 15.x"
Expand Down
1 change: 0 additions & 1 deletion src/ComplexSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,4 @@ export default class ComplexSelector {
return results;
};
}

}
16 changes: 9 additions & 7 deletions src/ReactWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ function filterWhereUnwrapped(wrapper, predicate) {
* @class ReactWrapper
*/
class ReactWrapper {

constructor(nodes, root, options = {}) {
if (!global.window && !global.document) {
throw new Error(
Expand All @@ -76,12 +75,15 @@ class ReactWrapper {
if (!root) {
const ReactWrapperComponent = createWrapperComponent(nodes, options);
this.component = renderWithOptions(
<ReactWrapperComponent
Component={nodes.type}
props={nodes.props}
context={options.context}
/>,
options);
(
<ReactWrapperComponent
Component={nodes.type}
props={nodes.props}
context={options.context}
/>
),
options,
);
this.root = this;
this.node = this.component.getWrappedComponent();
this.nodes = [this.node];
Expand Down
3 changes: 1 addition & 2 deletions src/ShallowWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ function performBatchedUpdates(wrapper, fn) {
* @class ShallowWrapper
*/
class ShallowWrapper {

constructor(nodes, root, options = {}) {
validateOptions(options);
if (!root) {
Expand Down Expand Up @@ -725,7 +724,7 @@ class ShallowWrapper {
*/
parents(selector) {
const allParents = this.wrap(
this.single('parents', n => parentsOfNode(n, this.root.getNode())),
this.single('parents', n => parentsOfNode(n, this.root.getNode())),
);
return selector ? allParents.filter(selector) : allParents;
}
Expand Down
Loading

0 comments on commit 8ffeeb1

Please sign in to comment.