@samitouri / QOS-React / commits / a269e7ec3f

Enable react/jsx-space-before-closing rule (#9077)

We mostly do this but not 100%; I fixed the stragglers here with `./node_modules/.bin/eslint --fix src` and enabled the lint rule.

Ben Alpert committed Feb 28, 2017 at 09:03 UTC a269e7ec3ff78fa64d1b73de2486d84563238183
22 files changed +89 -88
.eslintrc.js
+1
@@ -43,6 +43,7 @@ module.exports = {
43 'react/jsx-no-undef': ERROR,
44 // We don't care to do this
45 'react/jsx-sort-prop-types': OFF,
46 + 'react/jsx-space-before-closing': ERROR,
47 'react/jsx-uses-react': ERROR,
48 'react/no-is-mounted': OFF,
49 // This isn't useful in our test code
src/addons/transitions/__tests__/ReactCSSTransitionGroup-test.js
+3 -3
@@ -283,8 +283,8 @@ describe('ReactCSSTransitionGroup', () => {
283 }
284 }
285
286 - ReactDOM.render(<Component/>, container);
287 - ReactDOM.render(<Component><span key="yolo" id="yolo"/></Component>, container);
286 + ReactDOM.render(<Component />, container);
287 + ReactDOM.render(<Component><span key="yolo" id="yolo" /></Component>, container);
288
289 ReactDOM.unmountComponentAtNode(container);
290
@@ -322,7 +322,7 @@ describe('ReactCSSTransitionGroup', () => {
322 }
323 }
324
325 - ReactDOM.render(<Component/>, container);
325 + ReactDOM.render(<Component />, container);
326
327 // Testing that no exception is thrown here, as the timeout has been cleared.
328 jest.runAllTimers();
src/addons/transitions/__tests__/ReactTransitionGroup-test.js
+1 -1
@@ -297,7 +297,7 @@ describe('ReactTransitionGroup', () => {
297
298 class Component extends React.Component {
299 render() {
300 - var children = [<div key="1"/>, <div key="1" />];
300 + var children = [<div key="1" />, <div key="1" />];
301 return <ReactTransitionGroup>{children}</ReactTransitionGroup>;
302 }
303 }
src/isomorphic/classic/__tests__/ReactContextValidator-test.js
+4 -4
@@ -311,7 +311,7 @@ describe('ReactContextValidator', () => {
311 }
312 }
313
314 - ReactTestUtils.renderIntoDocument(<ComponentA/>);
314 + ReactTestUtils.renderIntoDocument(<ComponentA />);
315 expectDev(console.error.calls.count()).toBe(1);
316 expectDev(normalizeCodeLocInfo(console.error.calls.argsFor(0)[0])).toBe(
317 'Warning: ComponentA.childContextTypes is specified but there is no ' +
@@ -320,9 +320,9 @@ describe('ReactContextValidator', () => {
320 );
321
322 // Warnings should be deduped by component type
323 - ReactTestUtils.renderIntoDocument(<ComponentA/>);
323 + ReactTestUtils.renderIntoDocument(<ComponentA />);
324 expectDev(console.error.calls.count()).toBe(1);
325 - ReactTestUtils.renderIntoDocument(<ComponentB/>);
325 + ReactTestUtils.renderIntoDocument(<ComponentB />);
326 expectDev(console.error.calls.count()).toBe(2);
327 expectDev(normalizeCodeLocInfo(console.error.calls.argsFor(1)[0])).toBe(
328 'Warning: ComponentB.childContextTypes is specified but there is no ' +
@@ -371,7 +371,7 @@ describe('ReactContextValidator', () => {
371 },
372 });
373
374 - ReactTestUtils.renderIntoDocument(<ParentContextProvider/>);
374 + ReactTestUtils.renderIntoDocument(<ParentContextProvider />);
375 expect(childContext.bar).toBeUndefined();
376 expect(childContext.foo).toBe('FOO');
377 });
src/isomorphic/classic/element/__tests__/ReactElement-test.js
+1 -1
@@ -553,7 +553,7 @@ describe('comparing jsx vs .createFactory() vs .createElement()', () => {
553 );
554 },
555 });
556 - instance = ReactTestUtils.renderIntoDocument(<Parent/>);
556 + instance = ReactTestUtils.renderIntoDocument(<Parent />);
557 });
558
559 it('should scry children but cannot', () => {
src/renderers/__tests__/ReactComponent-test.js
+8 -8
@@ -56,9 +56,9 @@ describe('ReactComponent', () => {
56 expect(() => {
57 ReactTestUtils.renderIntoDocument(
58 <Wrapper>
59 - <span key={0}/>
60 - <span key={1}/>
61 - <span key={2}/>
59 + <span key={0} />
60 + <span key={1} />
61 + <span key={2} />
62 </Wrapper>
63 );
64 }).toThrowError(/Cannot assign to read only property.*/);
@@ -81,9 +81,9 @@ describe('ReactComponent', () => {
81 expect(() => {
82 ReactTestUtils.renderIntoDocument(
83 <Wrapper>
84 - <span key={0}/>
85 - <span key={1}/>
86 - <span key={2}/>
84 + <span key={0} />
85 + <span key={1} />
86 + <span key={2} />
87 </Wrapper>
88 );
89 }).toThrowError(/Cannot assign to read only property.*/);
@@ -247,10 +247,10 @@ describe('ReactComponent', () => {
247 <div>
248 <Inner id={1} ref={(c) => {
249 log.push(`ref 1 got ${c ? `instance ${c.props.id}` : 'null'}`);
250 - }}/>
250 + }} />
251 <Inner id={2} ref={(c) => {
252 log.push(`ref 2 got ${c ? `instance ${c.props.id}` : 'null'}`);
253 - }}/>
253 + }} />
254 </div>
255 );
256 }
src/renderers/__tests__/ReactComponentLifeCycle-test.js
+3 -3
@@ -248,7 +248,7 @@ describe('ReactComponentLifeCycle', () => {
248 },
249 render: function() {
250 expect(this.isMounted()).toBeFalsy();
251 - return <div/>;
251 + return <div />;
252 },
253 });
254
@@ -292,7 +292,7 @@ describe('ReactComponentLifeCycle', () => {
292 it('isMounted should return false when unmounted', () => {
293 var Component = React.createClass({
294 render: function() {
295 - return <div/>;
295 + return <div />;
296 },
297 });
298
@@ -319,7 +319,7 @@ describe('ReactComponentLifeCycle', () => {
319 if (this.state.isMounted) {
320 expect(ReactDOM.findDOMNode(this).tagName).toBe('DIV');
321 }
322 - return <div/>;
322 + return <div />;
323 },
324 });
325
src/renderers/__tests__/ReactCompositeComponent-test.js
+4 -4
@@ -138,19 +138,19 @@ describe('ReactCompositeComponent', () => {
138 it('should not cache old DOM nodes when switching constructors', () => {
139 var container = document.createElement('div');
140 var instance = ReactDOM.render(
141 - <ChildUpdates renderAnchor={true} anchorClassOn={false}/>,
141 + <ChildUpdates renderAnchor={true} anchorClassOn={false} />,
142 container
143 );
144 ReactDOM.render( // Warm any cache
145 - <ChildUpdates renderAnchor={true} anchorClassOn={true}/>,
145 + <ChildUpdates renderAnchor={true} anchorClassOn={true} />,
146 container
147 );
148 ReactDOM.render( // Clear out the anchor
149 - <ChildUpdates renderAnchor={false} anchorClassOn={true}/>,
149 + <ChildUpdates renderAnchor={false} anchorClassOn={true} />,
150 container
151 );
152 ReactDOM.render( // rerender
153 - <ChildUpdates renderAnchor={true} anchorClassOn={false}/>,
153 + <ChildUpdates renderAnchor={true} anchorClassOn={false} />,
154 container
155 );
156 expect(instance.getAnchor().className).toBe('');
src/renderers/__tests__/ReactMultiChild-test.js
+4 -4
@@ -178,12 +178,12 @@ describe('ReactMultiChild', () => {
178 }
179
180 ReactDOM.render(
181 - <Parent>{[<div key="1"/>]}</Parent>,
181 + <Parent>{[<div key="1" />]}</Parent>,
182 container
183 );
184
185 ReactDOM.render(
186 - <Parent>{[<div key="1"/>, <div key="1"/>]}</Parent>,
186 + <Parent>{[<div key="1" />, <div key="1" />]}</Parent>,
187 container
188 );
189
@@ -241,12 +241,12 @@ describe('ReactMultiChild', () => {
241 }
242
243 ReactDOM.render(
244 - <Parent>{createIterable([<div key="1"/>])}</Parent>,
244 + <Parent>{createIterable([<div key="1" />])}</Parent>,
245 container
246 );
247
248 ReactDOM.render(
249 - <Parent>{createIterable([<div key="1"/>, <div key="1"/>])}</Parent>,
249 + <Parent>{createIterable([<div key="1" />, <div key="1" />])}</Parent>,
250 container
251 );
252
src/renderers/__tests__/refs-destruction-test.js
+3 -3
@@ -107,20 +107,20 @@ describe('refs-destruction', () => {
107 class AppModal extends React.Component {
108 render() {
109 return (<Modal>
110 - <a ref="ref"/>
110 + <a ref="ref" />
111 </Modal>);
112 }
113 }
114
115 class App extends React.Component {
116 render() {
117 - return this.props.hidden ? null : <AppModal onClose={this.close}/>;
117 + return this.props.hidden ? null : <AppModal onClose={this.close} />;
118 }
119 }
120
121 var container = document.createElement('div');
122 ReactDOM.render(<App />, container);
123 - ReactDOM.render(<App hidden={true}/>, container);
123 + ReactDOM.render(<App hidden={true} />, container);
124 jest.runAllTimers();
125 });
126 });
src/renderers/__tests__/refs-test.js
+1 -1
@@ -77,7 +77,7 @@ class TestRefsComponent extends React.Component {
77 Reset Me By Clicking This.
78 </div>
79 <GeneralContainerComponent ref="myContainer">
80 - <ClickCounter ref="myCounter" initialCount={1}/>
80 + <ClickCounter ref="myCounter" initialCount={1} />
81 </GeneralContainerComponent>
82 </div>
83 );
src/renderers/dom/shared/__tests__/CSSPropertyOperations-test.js
+2 -2
@@ -112,7 +112,7 @@ describe('CSSPropertyOperations', () => {
112 static displayName = 'Comp';
113
114 render() {
115 - return <div style={{ 'background-color': 'crimson' }}/>;
115 + return <div style={{ 'background-color': 'crimson' }} />;
116 }
117 }
118
@@ -216,7 +216,7 @@ describe('CSSPropertyOperations', () => {
216 static displayName = 'Comp';
217
218 render() {
219 - return <div style={{ fontSize: NaN }}/>;
219 + return <div style={{ fontSize: NaN }} />;
220 }
221 }
222
src/renderers/dom/shared/__tests__/ReactDOM-test.js
+1 -1
@@ -287,7 +287,7 @@ describe('ReactDOM', () => {
287 ReactDOM.render(
288 <div>
289 <h1>Auto-focus Test</h1>
290 - <input autoFocus={true}/>
290 + <input autoFocus={true} />
291 <p>The above input should be focused after mount.</p>
292 </div>,
293 container,
src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
+24 -24
@@ -360,8 +360,8 @@ describe('ReactDOMComponent', () => {
360
361 it('should properly update custom attributes on custom elements', () => {
362 var container = document.createElement('div');
363 - ReactDOM.render(<some-custom-element foo="bar"/>, container);
364 - ReactDOM.render(<some-custom-element bar="buzz"/>, container);
363 + ReactDOM.render(<some-custom-element foo="bar" />, container);
364 + ReactDOM.render(<some-custom-element bar="buzz" />, container);
365 var node = container.firstChild;
366 expect(node.hasAttribute('foo')).toBe(false);
367 expect(node.getAttribute('bar')).toBe('buzz');
@@ -637,7 +637,7 @@ describe('ReactDOMComponent', () => {
637
638 it('should ignore attribute whitelist for elements with the "is: attribute', () => {
639 var container = document.createElement('div');
640 - ReactDOM.render(<button is="test" cowabunga="chevynova"/>, container);
640 + ReactDOM.render(<button is="test" cowabunga="chevynova" />, container);
641 expect(container.firstChild.hasAttribute('cowabunga')).toBe(true);
642 });
643
@@ -838,7 +838,7 @@ describe('ReactDOMComponent', () => {
838 }
839 }
840
841 - var returnedValue = ReactDOMServer.renderToString(<Container/>);
841 + var returnedValue = ReactDOMServer.renderToString(<Container />);
842 expect(returnedValue).not.toContain('</BR>');
843 expectDev(console.error.calls.count()).toBe(1);
844 expectDev(console.error.calls.argsFor(0)[0]).toContain(
@@ -1060,7 +1060,7 @@ describe('ReactDOMComponent', () => {
1060
1061 it('should track input values', () => {
1062 var container = document.createElement('div');
1063 - var inst = ReactDOM.render(<input type="text" defaultValue="foo"/>, container);
1063 + var inst = ReactDOM.render(<input type="text" defaultValue="foo" />, container);
1064
1065 var tracker = inputValueTracking._getTrackerFromNode(inst);
1066
@@ -1069,7 +1069,7 @@ describe('ReactDOMComponent', () => {
1069
1070 it('should track textarea values', () => {
1071 var container = document.createElement('div');
1072 - var inst = ReactDOM.render(<textarea defaultValue="foo"/>, container);
1072 + var inst = ReactDOM.render(<textarea defaultValue="foo" />, container);
1073
1074 var tracker = inputValueTracking._getTrackerFromNode(inst);
1075
@@ -1211,7 +1211,7 @@ describe('ReactDOMComponent', () => {
1211 }
1212
1213 expect(function() {
1214 - ReactDOM.render(<Animal/>, container);
1214 + ReactDOM.render(<Animal />, container);
1215 }).toThrowError(
1216 'The `style` prop expects a mapping from style properties to values, ' +
1217 'not a string. For example, style={{marginRight: spacing + \'em\'}} ' +
@@ -1242,7 +1242,7 @@ describe('ReactDOMComponent', () => {
1242 if (!ReactDOMFeatureFlags.useFiber) {
1243 it('should clean up input value tracking', () => {
1244 var container = document.createElement('div');
1245 - var node = ReactDOM.render(<input type="text" defaultValue="foo"/>, container);
1245 + var node = ReactDOM.render(<input type="text" defaultValue="foo" />, container);
1246 var tracker = inputValueTracking._getTrackerFromNode(node);
1247
1248 spyOn(tracker, 'stopTracking');
@@ -1254,7 +1254,7 @@ describe('ReactDOMComponent', () => {
1254
1255 it('should clean up input textarea tracking', () => {
1256 var container = document.createElement('div');
1257 - var node = ReactDOM.render(<textarea defaultValue="foo"/>, container);
1257 + var node = ReactDOM.render(<textarea defaultValue="foo" />, container);
1258 var tracker = inputValueTracking._getTrackerFromNode(node);
1259
1260 spyOn(tracker, 'stopTracking');
@@ -1303,7 +1303,7 @@ describe('ReactDOMComponent', () => {
1303
1304 it('should not warn when server-side rendering `onScroll`', () => {
1305 spyOn(console, 'error');
1306 - ReactDOMServer.renderToString(<div onScroll={() => {}}/>);
1306 + ReactDOMServer.renderToString(<div onScroll={() => {}} />);
1307 expectDev(console.error).not.toHaveBeenCalled();
1308 });
1309 });
@@ -1614,8 +1614,8 @@ describe('ReactDOMComponent', () => {
1614
1615 it('gives source code refs for unknown prop warning', () => {
1616 spyOn(console, 'error');
1617 - ReactTestUtils.renderIntoDocument(<div class="paladin"/>);
1618 - ReactTestUtils.renderIntoDocument(<input type="text" onclick="1"/>);
1617 + ReactTestUtils.renderIntoDocument(<div class="paladin" />);
1618 + ReactTestUtils.renderIntoDocument(<input type="text" onclick="1" />);
1619 expectDev(console.error.calls.count()).toBe(2);
1620 expect(
1621 normalizeCodeLocInfo(console.error.calls.argsFor(0)[0])
@@ -1632,8 +1632,8 @@ describe('ReactDOMComponent', () => {
1632
1633 it('gives source code refs for unknown prop warning (ssr)', () => {
1634 spyOn(console, 'error');
1635 - ReactDOMServer.renderToString(<div class="paladin"/>);
1636 - ReactDOMServer.renderToString(<input type="text" onclick="1"/>);
1635 + ReactDOMServer.renderToString(<div class="paladin" />);
1636 + ReactDOMServer.renderToString(<input type="text" onclick="1" />);
1637 expectDev(console.error.calls.count()).toBe(2);
1638 expect(
1639 normalizeCodeLocInfo(console.error.calls.argsFor(0)[0])
@@ -1669,11 +1669,11 @@ describe('ReactDOMComponent', () => {
1669
1670 ReactTestUtils.renderIntoDocument(
1671 <div className="foo1">
1672 - <div class="foo2"/>
1673 - <div onClick="foo3"/>
1674 - <div onclick="foo4"/>
1675 - <div className="foo5"/>
1676 - <div className="foo6"/>
1672 + <div class="foo2" />
1673 + <div onClick="foo3" />
1674 + <div onclick="foo4" />
1675 + <div className="foo5" />
1676 + <div className="foo6" />
1677 </div>
1678 );
1679
@@ -1697,11 +1697,11 @@ describe('ReactDOMComponent', () => {
1697
1698 ReactDOMServer.renderToString(
1699 <div className="foo1">
1700 - <div class="foo2"/>
1701 - <div onClick="foo3"/>
1702 - <div onclick="foo4"/>
1703 - <div className="foo5"/>
1704 - <div className="foo6"/>
1700 + <div class="foo2" />
1701 + <div onClick="foo3" />
1702 + <div onclick="foo4" />
1703 + <div className="foo5" />
1704 + <div className="foo6" />
1705 </div>
1706 );
1707
src/renderers/dom/shared/__tests__/ReactDOMTextComponent-test.js
+2 -2
@@ -131,7 +131,7 @@ describe('ReactDOMTextComponent', () => {
131
132 it('can reconcile text arbitrarily split into multiple nodes on some substitutions only', () => {
133 var el = document.createElement('div');
134 - var inst = ReactDOM.render(<div><span />{'bar'}<span />{'foobarbaz'}{'foo'}{'barfoo'}<span/></div>, el);
134 + var inst = ReactDOM.render(<div><span />{'bar'}<span />{'foobarbaz'}{'foo'}{'barfoo'}<span /></div>, el);
135
136 var container = ReactDOM.findDOMNode(inst);
137 let childNodes = filterOutComments(ReactDOM.findDOMNode(inst).childNodes);
@@ -143,7 +143,7 @@ describe('ReactDOMTextComponent', () => {
143 secondTextNode.textContent = 'bar';
144 container.insertBefore(document.createTextNode('foo'), childNodes[5].nextSibling);
145
146 - inst = ReactDOM.render(<div><span />{'baz'}<span />{'barbazqux'}{'bar'}{'bazbar'}<span/></div>, el);
146 + inst = ReactDOM.render(<div><span />{'baz'}<span />{'barbazqux'}{'bar'}{'bazbar'}<span /></div>, el);
147 container = ReactDOM.findDOMNode(inst);
148 expect(container.textContent).toBe('bazbarbazquxbarbazbar');
149 });
src/renderers/dom/shared/__tests__/ReactServerRendering-test.js
+3 -3
@@ -542,9 +542,9 @@ describe('ReactDOMServer', () => {
542 expect(() => {
543 ReactDOMServer.renderToStaticMarkup(
544 <Wrapper>
545 - <span key={0}/>
546 - <span key={1}/>
547 - <span key={2}/>
545 + <span key={0} />
546 + <span key={1} />
547 + <span key={2} />
548 </Wrapper>
549 );
550 }).toThrowError(/Cannot assign to read only property.*/);
src/renderers/dom/shared/__tests__/findDOMNode-test.js
+2 -2
@@ -91,11 +91,11 @@ describe('findDOMNode', () => {
91 }
92
93 render() {
94 - return <div/>;
94 + return <div />;
95 }
96 }
97
98 - expect(() => ReactTestUtils.renderIntoDocument(<Bar/>)).not.toThrow();
98 + expect(() => ReactTestUtils.renderIntoDocument(<Bar />)).not.toThrow();
99 });
100
101 });
src/renderers/dom/shared/eventPlugins/__tests__/ChangeEventPlugin-test.js
+9 -9
@@ -48,7 +48,7 @@ describe('ChangeEventPlugin', () => {
48 expect(e.type).toBe('change');
49 }
50
51 - var input = ReactTestUtils.renderIntoDocument(<input type="checkbox" onChange={cb}/>);
51 + var input = ReactTestUtils.renderIntoDocument(<input type="checkbox" onChange={cb} />);
52
53 setUntrackedValue(input, true);
54 ReactTestUtils.SimulateNative.click(input);
@@ -58,7 +58,7 @@ describe('ChangeEventPlugin', () => {
58
59 it('should catch setting the value programmatically', () => {
60 var input = ReactTestUtils.renderIntoDocument(
61 - <input type="text" defaultValue="foo"/>
61 + <input type="text" defaultValue="foo" />
62 );
63
64 input.value = 'bar';
@@ -74,7 +74,7 @@ describe('ChangeEventPlugin', () => {
74 }
75
76 var input = ReactTestUtils.renderIntoDocument(
77 - <input type="text" onChange={cb} defaultValue="foo"/>
77 + <input type="text" onChange={cb} defaultValue="foo" />
78 );
79
80 input.value = 'bar';
@@ -124,7 +124,7 @@ describe('ChangeEventPlugin', () => {
124 called += 1;
125 }
126
127 - var input = ReactTestUtils.renderIntoDocument(<input type="radio" onChange={cb}/>);
127 + var input = ReactTestUtils.renderIntoDocument(<input type="radio" onChange={cb} />);
128 setUntrackedValue(input, true);
129 ReactTestUtils.SimulateNative.click(input);
130 ReactTestUtils.SimulateNative.click(input);
@@ -141,9 +141,9 @@ describe('ChangeEventPlugin', () => {
141 }
142
143 [
144 - <input type="text" onChange={cb}/>,
145 - <input type="number" onChange={cb}/>,
146 - <input type="range" onChange={cb}/>,
144 + <input type="text" onChange={cb} />,
145 + <input type="number" onChange={cb} />,
146 + <input type="range" onChange={cb} />,
147 ].forEach(function(element) {
148 called = 0;
149 input = ReactTestUtils.renderIntoDocument(element);
@@ -181,7 +181,7 @@ describe('ChangeEventPlugin', () => {
181 return;
182 }
183
184 - var input = ReactTestUtils.renderIntoDocument(<input type="range" onChange={cb}/>);
184 + var input = ReactTestUtils.renderIntoDocument(<input type="range" onChange={cb} />);
185 setUntrackedValue(input, 'bar');
186
187 ReactTestUtils.SimulateNative.input(input);
@@ -201,7 +201,7 @@ describe('ChangeEventPlugin', () => {
201 expect(e.type).toBe('change');
202 }
203
204 - var input = ReactTestUtils.renderIntoDocument(<input type="range" onChange={cb}/>);
204 + var input = ReactTestUtils.renderIntoDocument(<input type="range" onChange={cb} />);
205 setUntrackedValue(input, '40');
206 ReactTestUtils.SimulateNative.input(input);
207 ReactTestUtils.SimulateNative.change(input);
src/renderers/dom/shared/wrappers/__tests__/ReactDOMInput-test.js
+1 -1
@@ -407,7 +407,7 @@ describe('ReactDOMInput', () => {
407 ReactDOM.render(<input value="a" />, container);
408 expect(nodeValueSetter.mock.calls.length).toBe(0);
409
410 - ReactDOM.render(<input value="b"/>, container);
410 + ReactDOM.render(<input value="b" />, container);
411 expect(nodeValueSetter.mock.calls.length).toBe(1);
412 });
413
src/renderers/dom/shared/wrappers/__tests__/ReactDOMSelect-test.js
+2 -2
@@ -429,14 +429,14 @@ describe('ReactDOMSelect', () => {
429 it('should warn if value is null', () => {
430 spyOn(console, 'error');
431
432 - ReactTestUtils.renderIntoDocument(<select value={null}><option value="test"/></select>);
432 + ReactTestUtils.renderIntoDocument(<select value={null}><option value="test" /></select>);
433 expectDev(console.error.calls.argsFor(0)[0]).toContain(
434 '`value` prop on `select` should not be null. ' +
435 'Consider using the empty string to clear the component or `undefined` ' +
436 'for uncontrolled components.'
437 );
438
439 - ReactTestUtils.renderIntoDocument(<select value={null}><option value="test"/></select>);
439 + ReactTestUtils.renderIntoDocument(<select value={null}><option value="test" /></select>);
440 expectDev(console.error.calls.count()).toBe(1);
441 });
442
src/renderers/shared/fiber/__tests__/ReactIncrementalErrorHandling-test.js
+9 -9
@@ -965,12 +965,12 @@ describe('ReactIncrementalErrorHandling', () => {
965 throw Error('componentWillMount error');
966 }
967 render() {
968 - return <div/>;
968 + return <div />;
969 }
970 }
971
972 try {
973 - ReactNoop.render(<div><span><ErrorThrowingComponent/></span></div>);
973 + ReactNoop.render(<div><span><ErrorThrowingComponent /></span></div>);
974 ReactNoop.flushDeferredPri();
975 } catch (error) {}
976
@@ -999,12 +999,12 @@ describe('ReactIncrementalErrorHandling', () => {
999 throw Error('componentDidMount error');
1000 }
1001 render() {
1002 - return <div/>;
1002 + return <div />;
1003 }
1004 }
1005
1006 try {
1007 - ReactNoop.render(<div><span><ErrorThrowingComponent/></span></div>);
1007 + ReactNoop.render(<div><span><ErrorThrowingComponent /></span></div>);
1008 ReactNoop.flushDeferredPri();
1009 } catch (error) {}
1010
@@ -1045,7 +1045,7 @@ describe('ReactIncrementalErrorHandling', () => {
1045 );
1046
1047 try {
1048 - ReactNoop.render(<div><span><ErrorThrowingComponent/></span></div>);
1048 + ReactNoop.render(<div><span><ErrorThrowingComponent /></span></div>);
1049 ReactNoop.flushDeferredPri();
1050 } catch (error) {}
1051
@@ -1062,7 +1062,7 @@ describe('ReactIncrementalErrorHandling', () => {
1062
1063 class ParentComponent extends React.Component {
1064 render() {
1065 - return <ErrorBoundaryComponent/>;
1065 + return <ErrorBoundaryComponent />;
1066 }
1067 }
1068
@@ -1075,7 +1075,7 @@ describe('ReactIncrementalErrorHandling', () => {
1075 this.setState({}); // Render again
1076 }
1077 render() {
1078 - return <ErrorThrowingComponent/>;
1078 + return <ErrorThrowingComponent />;
1079 }
1080 }
1081
@@ -1085,12 +1085,12 @@ describe('ReactIncrementalErrorHandling', () => {
1085 }
1086 render() {
1087 renderAttempts++;
1088 - return <div/>;
1088 + return <div />;
1089 }
1090 }
1091
1092 try {
1093 - ReactNoop.render(<ParentComponent/>);
1093 + ReactNoop.render(<ParentComponent />);
1094 ReactNoop.flush();
1095 } catch (error) {}
1096
src/renderers/shared/fiber/__tests__/ReactIncrementalSideEffects-test.js
+1 -1
@@ -489,7 +489,7 @@ describe('ReactIncrementalSideEffects', () => {
489
490 it('can update a completed tree before it has a chance to commit', () => {
491 function Foo(props) {
492 - return <span prop={props.step}/>;
492 + return <span prop={props.step} />;
493 }
494 ReactNoop.render(<Foo step={1} />);
495 // This should be just enough to complete the tree without committing it