@samitouri / QOS-React-2 / commits / 5f8fe7d614

Don't test frag cases in ReactMultiChildText-test

These are now just testing the same as the array cases directly above. This should make this test a bunch faster because it (intentionally) has n^2 runtime.

Ben Alpert committed Oct 14, 2015 at 14:31 UTC 5f8fe7d614eed84fe4d0e65ec3efc8d2a4954acd
1 file changed -17
src/renderers/shared/reconciler/__tests__/ReactMultiChildText-test.js
-17
@@ -15,11 +15,8 @@ require('mock-modules');
15
16 var React = require('React');
17 var ReactDOM = require('ReactDOM');
18 -var ReactFragment = require('ReactFragment');
18 var ReactTestUtils = require('ReactTestUtils');
19
21 -var frag = ReactFragment.create;
22 -
20 // Helpers
21 var testAllPermutations = function(testCases) {
22 for (var i = 0; i < testCases.length; i += 2) {
@@ -164,20 +161,6 @@ describe('ReactMultiChildText', function() {
161 [true, [1.2, '', <div />, 'foo'], true, 1.2], ['1.2', '', <div />, 'foo', '1.2'],
162 ['', 'foo', [true, <div />, 1.2, ''], 'foo'], ['', 'foo', <div />, '1.2', '', 'foo'],
163
167 - // values inside objects
168 - [frag({a: true}), frag({a: true})], [],
169 - [frag({a: 1.2}), frag({a: 1.2})], ['1.2', '1.2'],
170 - [frag({a: ''}), frag({a: ''})], ['', ''],
171 - [frag({a: 'foo'}), frag({a: 'foo'})], ['foo', 'foo'],
172 - [frag({a: <div />}), frag({a: <div />})], [<div />, <div />],
173 -
174 - [frag({a: true, b: 1.2, c: <div />}), '', 'foo'], ['1.2', <div />, '', 'foo'],
175 - [1.2, '', frag({a: <div />, b: 'foo', c: true})], ['1.2', '', <div />, 'foo'],
176 - ['', frag({a: 'foo', b: <div />, c: true}), 1.2], ['', 'foo', <div />, '1.2'],
177 -
178 - [true, frag({a: 1.2, b: '', c: <div />, d: 'foo'}), true, 1.2], ['1.2', '', <div />, 'foo', '1.2'],
179 - ['', 'foo', frag({a: true, b: <div />, c: 1.2, d: ''}), 'foo'], ['', 'foo', <div />, '1.2', '', 'foo'],
180 -
164 // values inside elements
165 [<div>{true}{1.2}{<div />}</div>, '', 'foo'], [<div />, '', 'foo'],
166 [1.2, '', <div>{<div />}{'foo'}{true}</div>], ['1.2', '', <div />],