diff --git a/src/classic/element/__tests__/ReactElementValidator-test.js b/src/classic/element/__tests__/ReactElementValidator-test.js
index 2794997c05..9555335c48 100644
--- a/src/classic/element/__tests__/ReactElementValidator-test.js
+++ b/src/classic/element/__tests__/ReactElementValidator-test.js
@@ -40,7 +40,7 @@ describe('ReactElementValidator', function() {
spyOn(console, 'warn');
var Component = React.createFactory(ComponentClass);
- Component(null, [ Component(), Component() ]);
+ Component(null, [Component(), Component()]);
expect(console.warn.argsForCall.length).toBe(1);
expect(console.warn.argsForCall[0][0]).toContain(
@@ -64,7 +64,7 @@ describe('ReactElementValidator', function() {
var ComponentWrapper = React.createClass({
displayName: 'ComponentWrapper',
render: function() {
- return InnerComponent({childSet: [ Component(), Component() ] });
+ return InnerComponent({childSet: [Component(), Component()] });
}
});
@@ -108,7 +108,7 @@ describe('ReactElementValidator', function() {
spyOn(console, 'warn');
var Component = React.createFactory(ComponentClass);
- Component(null, [ Component({key: '#1'}), Component({key: '#2'}) ]);
+ Component(null, [Component({key: '#1'}), Component({key: '#2'})]);
expect(console.warn.argsForCall.length).toBe(0);
});
diff --git a/src/core/__tests__/ReactComponentLifeCycle-test.js b/src/core/__tests__/ReactComponentLifeCycle-test.js
index 9f8f14a585..e522e8b69b 100644
--- a/src/core/__tests__/ReactComponentLifeCycle-test.js
+++ b/src/core/__tests__/ReactComponentLifeCycle-test.js
@@ -291,10 +291,10 @@ describe('ReactComponentLifeCycle', function() {
spyOn(console, 'warn');
var Component = React.createClass({
getInitialState: function() {
- return { isMounted: false };
+ return {isMounted: false};
},
componentDidMount: function() {
- this.setState({ isMounted: true });
+ this.setState({isMounted: true});
},
render: function() {
if (this.state.isMounted) {
diff --git a/src/core/__tests__/ReactCompositeComponentNestedState-test.js b/src/core/__tests__/ReactCompositeComponentNestedState-test.js
index f17cd4cb88..eb1524faab 100644
--- a/src/core/__tests__/ReactCompositeComponentNestedState-test.js
+++ b/src/core/__tests__/ReactCompositeComponentNestedState-test.js
@@ -99,17 +99,17 @@ describe('ReactCompositeComponentNestedState-state', function() {
);
expect(logger.mock.calls).toEqual([
- [ 'parent-render', 'blue' ],
- [ 'getInitialState', 'blue' ],
- [ 'render', 'dark blue', 'blue' ],
- [ 'handleHue', 'dark blue', 'blue' ],
- [ 'parent-handleColor', 'blue' ],
- [ 'parent-render', 'green' ],
- [ 'setState-this', 'dark blue', 'blue' ],
- [ 'setState-args', 'dark blue', 'green' ],
- [ 'render', 'light green', 'green' ],
- [ 'parent-after-setState', 'green' ],
- [ 'after-setState', 'light green', 'green' ]
+ ['parent-render', 'blue'],
+ ['getInitialState', 'blue'],
+ ['render', 'dark blue', 'blue'],
+ ['handleHue', 'dark blue', 'blue'],
+ ['parent-handleColor', 'blue'],
+ ['parent-render', 'green'],
+ ['setState-this', 'dark blue', 'blue'],
+ ['setState-args', 'dark blue', 'green'],
+ ['render', 'light green', 'green'],
+ ['parent-after-setState', 'green'],
+ ['after-setState', 'light green', 'green']
]);
});
});
diff --git a/src/core/__tests__/ReactCompositeComponentState-test.js b/src/core/__tests__/ReactCompositeComponentState-test.js
index 8120c74e60..4f6a1e2da7 100644
--- a/src/core/__tests__/ReactCompositeComponentState-test.js
+++ b/src/core/__tests__/ReactCompositeComponentState-test.js
@@ -155,67 +155,67 @@ describe('ReactCompositeComponent-state', function() {
expect(stateListener.mock.calls).toEqual([
// there is no state when getInitialState() is called
- [ 'getInitialState', null ],
- [ 'componentWillMount-start', 'red' ],
+ ['getInitialState', null],
+ ['componentWillMount-start', 'red'],
// setState()'s only enqueue pending states.
- [ 'componentWillMount-after-sunrise', 'red' ],
- [ 'componentWillMount-end', 'red' ],
+ ['componentWillMount-after-sunrise', 'red'],
+ ['componentWillMount-end', 'red'],
// pending state queue is processed
- [ 'before-setState-sunrise', 'red' ],
- [ 'after-setState-sunrise', 'sunrise' ],
- [ 'after-setState-orange', 'orange' ],
+ ['before-setState-sunrise', 'red'],
+ ['after-setState-sunrise', 'sunrise'],
+ ['after-setState-orange', 'orange'],
// pending state has been applied
- [ 'render', 'orange' ],
- [ 'componentDidMount-start', 'orange' ],
+ ['render', 'orange'],
+ ['componentDidMount-start', 'orange'],
// setState-sunrise and setState-orange should be called here,
// after the bug in #1740
// componentDidMount() called setState({color:'yellow'}), which is async.
// The update doesn't happen until the next flush.
- [ 'componentDidMount-end', 'orange' ],
- [ 'shouldComponentUpdate-currentState', 'orange' ],
- [ 'shouldComponentUpdate-nextState', 'yellow' ],
- [ 'componentWillUpdate-currentState', 'orange' ],
- [ 'componentWillUpdate-nextState', 'yellow' ],
- [ 'render', 'yellow' ],
- [ 'componentDidUpdate-currentState', 'yellow' ],
- [ 'componentDidUpdate-prevState', 'orange' ],
- [ 'setState-yellow', 'yellow' ],
- [ 'initial-callback', 'yellow' ],
- [ 'componentWillReceiveProps-start', 'yellow' ],
+ ['componentDidMount-end', 'orange'],
+ ['shouldComponentUpdate-currentState', 'orange'],
+ ['shouldComponentUpdate-nextState', 'yellow'],
+ ['componentWillUpdate-currentState', 'orange'],
+ ['componentWillUpdate-nextState', 'yellow'],
+ ['render', 'yellow'],
+ ['componentDidUpdate-currentState', 'yellow'],
+ ['componentDidUpdate-prevState', 'orange'],
+ ['setState-yellow', 'yellow'],
+ ['initial-callback', 'yellow'],
+ ['componentWillReceiveProps-start', 'yellow'],
// setState({color:'green'}) only enqueues a pending state.
- [ 'componentWillReceiveProps-end', 'yellow' ],
+ ['componentWillReceiveProps-end', 'yellow'],
// pending state queue is processed
// before-setState-receiveProps never called, due to replaceState.
- [ 'before-setState-again-receiveProps', undefined ],
- [ 'after-setState-receiveProps', 'green' ],
- [ 'shouldComponentUpdate-currentState', 'yellow' ],
- [ 'shouldComponentUpdate-nextState', 'green' ],
- [ 'componentWillUpdate-currentState', 'yellow' ],
- [ 'componentWillUpdate-nextState', 'green' ],
- [ 'render', 'green' ],
- [ 'componentDidUpdate-currentState', 'green' ],
- [ 'componentDidUpdate-prevState', 'yellow' ],
- [ 'setState-receiveProps', 'green' ],
- [ 'setProps', 'green' ],
+ ['before-setState-again-receiveProps', undefined],
+ ['after-setState-receiveProps', 'green'],
+ ['shouldComponentUpdate-currentState', 'yellow'],
+ ['shouldComponentUpdate-nextState', 'green'],
+ ['componentWillUpdate-currentState', 'yellow'],
+ ['componentWillUpdate-nextState', 'green'],
+ ['render', 'green'],
+ ['componentDidUpdate-currentState', 'green'],
+ ['componentDidUpdate-prevState', 'yellow'],
+ ['setState-receiveProps', 'green'],
+ ['setProps', 'green'],
// setFavoriteColor('blue')
- [ 'shouldComponentUpdate-currentState', 'green' ],
- [ 'shouldComponentUpdate-nextState', 'blue' ],
- [ 'componentWillUpdate-currentState', 'green' ],
- [ 'componentWillUpdate-nextState', 'blue' ],
- [ 'render', 'blue' ],
- [ 'componentDidUpdate-currentState', 'blue' ],
- [ 'componentDidUpdate-prevState', 'green' ],
- [ 'setFavoriteColor', 'blue' ],
+ ['shouldComponentUpdate-currentState', 'green'],
+ ['shouldComponentUpdate-nextState', 'blue'],
+ ['componentWillUpdate-currentState', 'green'],
+ ['componentWillUpdate-nextState', 'blue'],
+ ['render', 'blue'],
+ ['componentDidUpdate-currentState', 'blue'],
+ ['componentDidUpdate-prevState', 'green'],
+ ['setFavoriteColor', 'blue'],
// forceUpdate()
- [ 'componentWillUpdate-currentState', 'blue' ],
- [ 'componentWillUpdate-nextState', 'blue' ],
- [ 'render', 'blue' ],
- [ 'componentDidUpdate-currentState', 'blue' ],
- [ 'componentDidUpdate-prevState', 'blue' ],
- [ 'forceUpdate', 'blue' ],
+ ['componentWillUpdate-currentState', 'blue'],
+ ['componentWillUpdate-nextState', 'blue'],
+ ['render', 'blue'],
+ ['componentDidUpdate-currentState', 'blue'],
+ ['componentDidUpdate-prevState', 'blue'],
+ ['forceUpdate', 'blue'],
// unmountComponent()
// state is available within `componentWillUnmount()`
- [ 'componentWillUnmount', 'blue' ]
+ ['componentWillUnmount', 'blue']
]);
});
});
diff --git a/src/modern/element/__tests__/ReactJSXElementValidator-test.js b/src/modern/element/__tests__/ReactJSXElementValidator-test.js
index 7eed4cbdaf..f5d64bccf8 100644
--- a/src/modern/element/__tests__/ReactJSXElementValidator-test.js
+++ b/src/modern/element/__tests__/ReactJSXElementValidator-test.js
@@ -61,7 +61,7 @@ describe('ReactJSXElementValidator', function() {
render() {
return (
, ]}
+ childSet={[, ]}
/>
);
}
@@ -103,7 +103,7 @@ describe('ReactJSXElementValidator', function() {
it('does not warns for arrays of elements with keys', function() {
spyOn(console, 'warn');
- {[ , ]};
+ {[, ]};
expect(console.warn.argsForCall.length).toBe(0);
});
diff --git a/src/utils/__tests__/ReactChildren-test.js b/src/utils/__tests__/ReactChildren-test.js
index 95b60a8460..80d266f774 100644
--- a/src/utils/__tests__/ReactChildren-test.js
+++ b/src/utils/__tests__/ReactChildren-test.js
@@ -434,7 +434,7 @@ describe('ReactChildren', function() {
it('should warn if a fragment is accessed', function() {
spyOn(console, 'warn');
var child = React.createElement('span');
- var frag = ReactChildren.map([ child, child ], function(c) {
+ var frag = ReactChildren.map([child, child], function(c) {
return c;
});
for (var key in frag) {
@@ -444,7 +444,7 @@ describe('ReactChildren', function() {
expect(console.warn.calls.length).toBe(1);
expect(console.warn.calls[0].args[0]).toContain('is an opaque type');
- var frag2 = ReactChildren.map([ child, child ], function(c) {
+ var frag2 = ReactChildren.map([child, child], function(c) {
return c;
});
for (var key in frag2) {