remove space before round brace in function expressions
Henry Zhu committed
Feb 13, 2015 at 23:41 UTC
74726f0af597494cc703d6a7f58fca1503a2e6f3
5 files changed
+13
-13
src/classic/element/__tests__/ReactElementValidator-test.js
+1
-1
@@ -322,7 +322,7 @@ describe('ReactElementValidator', function() {
322
expect(console.warn.calls.length).toBe(2);
323
});
324
325
- it('should warn if a fragment is used without the wrapper', function () {
325
+ it('should warn if a fragment is used without the wrapper', function() {
326
spyOn(console, 'warn');
327
var child = React.createElement('span');
328
React.createElement('div', null, { a: child, b: child });
src/core/__tests__/ReactCompositeComponent-test.js
+1
-1
@@ -478,7 +478,7 @@ describe('ReactCompositeComponent', function() {
478
479
it('should warn when shouldComponentUpdate() returns undefined', function() {
480
var Component = React.createClass({
481
- getInitialState: function () {
481
+ getInitialState: function() {
482
return {bogus: false};
483
},
484
src/core/__tests__/ReactCompositeComponentNestedState-test.js
+3
-3
@@ -31,7 +31,7 @@ describe('ReactCompositeComponentNestedState-state', function() {
31
32
handleColor: function(color) {
33
this.props.logger('parent-handleColor', this.state.color);
34
- this.setState({ color: color }, function () {
34
+ this.setState({ color: color }, function() {
35
this.props.logger('parent-after-setState', this.state.color);
36
});
37
},
@@ -55,11 +55,11 @@ describe('ReactCompositeComponentNestedState-state', function() {
55
handleHue: function(shade, color) {
56
this.props.logger('handleHue', this.state.hue, this.props.color);
57
this.props.onSelectColor(color);
58
- this.setState(function (state, props) {
58
+ this.setState(function(state, props) {
59
this.props.logger('setState-this', this.state.hue, this.props.color);
60
this.props.logger('setState-args', state.hue, props.color);
61
return { hue: shade + ' ' + props.color }
62
- }, function () {
62
+ }, function() {
63
this.props.logger('after-setState', this.state.hue, this.props.color);
64
});
65
},
src/core/__tests__/ReactCompositeComponentState-test.js
+6
-6
@@ -57,14 +57,14 @@ describe('ReactCompositeComponent-state', function() {
57
58
componentWillMount: function() {
59
this.peekAtState('componentWillMount-start');
60
- this.setState(function (state) {
60
+ this.setState(function(state) {
61
this.peekAtState('before-setState-sunrise', state);
62
});
63
this.setState(
64
{color: 'sunrise'},
65
this.peekAtCallback('setState-sunrise')
66
);
67
- this.setState(function (state) {
67
+ this.setState(function(state) {
68
this.peekAtState('after-setState-sunrise', state);
69
});
70
this.peekAtState('componentWillMount-after-sunrise');
@@ -72,7 +72,7 @@ describe('ReactCompositeComponent-state', function() {
72
{color: 'orange'},
73
this.peekAtCallback('setState-orange')
74
);
75
- this.setState(function (state) {
75
+ this.setState(function(state) {
76
this.peekAtState('after-setState-orange', state);
77
});
78
this.peekAtState('componentWillMount-end');
@@ -90,19 +90,19 @@ describe('ReactCompositeComponent-state', function() {
90
componentWillReceiveProps: function(newProps) {
91
this.peekAtState('componentWillReceiveProps-start');
92
if (newProps.nextColor) {
93
- this.setState(function (state) {
93
+ this.setState(function(state) {
94
this.peekAtState('before-setState-receiveProps', state);
95
return {color: newProps.nextColor};
96
});
97
this.replaceState({ color: undefined });
98
this.setState(
99
- function (state) {
99
+ function(state) {
100
this.peekAtState('before-setState-again-receiveProps', state);
101
return {color: newProps.nextColor};
102
},
103
this.peekAtCallback('setState-receiveProps')
104
);
105
- this.setState(function (state) {
105
+ this.setState(function(state) {
106
this.peekAtState('after-setState-receiveProps', state);
107
});
108
}
src/utils/__tests__/ReactChildren-test.js
+2
-2
@@ -421,7 +421,7 @@ describe('ReactChildren', function() {
421
expect(numberOfChildren).toBe(6);
422
});
423
424
- it('should warn if a fragment is used without the wrapper', function () {
424
+ it('should warn if a fragment is used without the wrapper', function() {
425
spyOn(console, 'warn');
426
var child = React.createElement('span');
427
ReactChildren.forEach({ a: child, b: child}, function(c) {
@@ -431,7 +431,7 @@ describe('ReactChildren', function() {
431
expect(console.warn.calls[0].args[0]).toContain('use of a keyed object');
432
});
433
434
- it('should warn if a fragment is accessed', function () {
434
+ it('should warn if a fragment is accessed', function() {
435
spyOn(console, 'warn');
436
var child = React.createElement('span');
437
var frag = ReactChildren.map([ child, child ], function(c) {