Run prettier
Andrew Clark committed
Mar 21, 2017 at 18:39 UTC
194b25f7099f2bdc85917e26a0a490f942f2553b
8 files changed
+32
-19
src/isomorphic/classic/__tests__/ReactContextValidator-test.js
-1
@@ -156,7 +156,6 @@ describe('ReactContextValidator', () => {
156
foo: React.PropTypes.string,
157
};
158
159
-
159
var container = document.createElement('div');
160
ReactDOM.render(<Parent foo="abc" />, container);
161
ReactDOM.render(<Parent foo="def" />, container);
src/isomorphic/classic/element/__tests__/ReactElement-test.js
+13
-3
@@ -497,7 +497,7 @@ describe('comparing jsx vs .createFactory() vs .createElement()', () => {
497
);
498
}
499
};
500
- instance = ReactTestUtils.renderIntoDocument(<Parent/>);
500
+ instance = ReactTestUtils.renderIntoDocument(<Parent />);
501
});
502
503
it('should scry children but cannot', () => {
@@ -526,7 +526,10 @@ describe('comparing jsx vs .createFactory() vs .createElement()', () => {
526
var childFactory = React.createFactory(Child);
527
class Parent extends React.Component {
528
render() {
529
- return React.DOM.div({}, childFactory({ ref: 'child', foo: 'foo value' }, 'children value'));
529
+ return React.DOM.div(
530
+ {},
531
+ childFactory({ref: 'child', foo: 'foo value'}, 'children value'),
532
+ );
533
}
534
}
535
factory = React.createFactory(Parent);
@@ -558,7 +561,14 @@ describe('comparing jsx vs .createFactory() vs .createElement()', () => {
561
beforeEach(() => {
562
class Parent extends React.Component {
563
render() {
561
- return React.DOM.div({}, React.createElement(Child, { ref: 'child', foo: 'foo value' }, 'children value'));
564
+ return React.DOM.div(
565
+ {},
566
+ React.createElement(
567
+ Child,
568
+ {ref: 'child', foo: 'foo value'},
569
+ 'children value',
570
+ ),
571
+ );
572
}
573
}
574
factory = React.createFactory(Parent);
src/isomorphic/classic/element/__tests__/ReactElementClone-test.js
+7
-6
@@ -177,8 +177,10 @@ describe('ReactElementClone', () => {
177
it('should support keys and refs', () => {
178
class Parent extends React.Component {
179
render() {
180
- var clone =
181
- React.cloneElement(this.props.children, {key: 'xyz', ref: 'xyz'});
180
+ var clone = React.cloneElement(this.props.children, {
181
+ key: 'xyz',
182
+ ref: 'xyz',
183
+ });
184
expect(clone.key).toBe('xyz');
185
expect(clone.ref).toBe('xyz');
186
return <div>{clone}</div>;
@@ -300,10 +302,9 @@ describe('ReactElementClone', () => {
302
}
303
class GrandParent extends React.Component {
304
render() {
303
- return React.createElement(
304
- Parent,
305
- { child: React.createElement(Component, {color: 'red'}) }
306
- );
305
+ return React.createElement(Parent, {
306
+ child: React.createElement(Component, {color: 'red'}),
307
+ });
308
}
309
}
310
ReactTestUtils.renderIntoDocument(React.createElement(GrandParent));
src/isomorphic/classic/element/__tests__/ReactElementValidator-test.js
+2
-3
@@ -64,7 +64,7 @@ describe('ReactElementValidator', () => {
64
65
class ComponentWrapper extends React.Component {
66
render() {
67
- return InnerComponent({childSet: [Component(), Component()] });
67
+ return InnerComponent({childSet: [Component(), Component()]});
68
}
69
}
70
@@ -84,7 +84,7 @@ describe('ReactElementValidator', () => {
84
function Anonymous() {
85
return <div />;
86
}
87
- Object.defineProperty(Anonymous, 'name', { value: undefined });
87
+ Object.defineProperty(Anonymous, 'name', {value: undefined});
88
89
var divs = [<div />, <div />];
90
ReactTestUtils.renderIntoDocument(<Anonymous>{divs}</Anonymous>);
@@ -418,7 +418,6 @@ describe('ReactElementValidator', () => {
418
class Component extends React.Component {
419
render() {
420
return React.createElement('span', null, this.props.myProp.value);
421
-
421
}
422
}
423
Component.propTypes = {
src/renderers/__tests__/ReactComponentLifeCycle-test.js
+2
-2
@@ -239,7 +239,7 @@ describe('ReactComponentLifeCycle', () => {
239
}
240
render() {
241
expect(this._isMounted()).toBeFalsy();
242
- return <div/>;
242
+ return <div />;
243
}
244
}
245
@@ -288,7 +288,7 @@ describe('ReactComponentLifeCycle', () => {
288
it('isMounted should return false when unmounted', () => {
289
class Component extends React.Component {
290
render() {
291
- return <div/>;
291
+ return <div />;
292
}
293
}
294
src/renderers/__tests__/ReactCompositeComponentState-test.js
+2
-2
@@ -33,11 +33,11 @@ describe('ReactCompositeComponent-state', () => {
33
34
peekAtState = (from, state = this.state, props = this.props) => {
35
props.stateListener(from, state && state.color);
36
- }
36
+ };
37
38
peekAtCallback = from => {
39
return () => this.peekAtState(from);
40
- }
40
+ };
41
42
setFavoriteColor(nextColor) {
43
this.setState(
src/renderers/__tests__/ReactStatelessComponent-test.js
+3
-1
@@ -280,7 +280,9 @@ describe('ReactStatelessComponent', () => {
280
});
281
}
282
}
283
- Object.defineProperty(AnonymousParentNotUsingJSX, 'name', {value: undefined});
283
+ Object.defineProperty(AnonymousParentNotUsingJSX, 'name', {
284
+ value: undefined,
285
+ });
286
287
const instance2 = ReactTestUtils.renderIntoDocument(
288
<AnonymousParentNotUsingJSX />,
src/renderers/shared/fiber/__tests__/ReactIncrementalUpdates-test.js
+3
-1
@@ -268,7 +268,9 @@ describe('ReactIncrementalUpdates', () => {
268
instance.setState({b: 'b'});
269
// No longer a public API, but we can test that it works internally by
270
// reaching into the updater.
271
- instance.updater.enqueueReplaceState(instance, previousState => ({previousState}));
271
+ instance.updater.enqueueReplaceState(instance, previousState => ({
272
+ previousState,
273
+ }));
274
ReactNoop.flush();
275
expect(instance.state).toEqual({previousState: {a: 'a', b: 'b'}});
276
});