@samitouri / QOS-React-2 / commits / 33c3121f43

Remove a duplicate test

This test is identical to "should warn when stateless component returns array" earlier. It was moved from another file in #5884 so it likely survived by accident.

Dan Abramov committed Dec 28, 2016 at 00:22 UTC 33c3121f43bfbfa18d6ab0b98f3d447b713023a8
1 file changed -14
src/renderers/shared/shared/__tests__/ReactStatelessComponent-test.js
-14
@@ -388,18 +388,4 @@ describe('ReactStatelessComponent', () => {
388 expect(() => ReactTestUtils.renderIntoDocument(<Child />)).not.toThrow();
389 });
390
391 - it('should warn when using non-React functions in JSX', () => {
392 - spyOn(console, 'error');
393 - function NotAComponent() {
394 - return [<div />, <div />];
395 - }
396 - expect(function() {
397 - ReactTestUtils.renderIntoDocument(<div><NotAComponent /></div>);
398 - }).toThrow(); // has no method 'render'
399 - expectDev(console.error.calls.count()).toBe(1);
400 - expectDev(console.error.calls.argsFor(0)[0]).toContain(
401 - 'NotAComponent(...): A valid React element (or null) must be returned. You may ' +
402 - 'have returned undefined, an array or some other invalid object.'
403 - );
404 - });
391 });