@samitouri / QOS-React / commits / 08b4cc53b8

Track passing/failing tests in fiber (#8169)

* Work around jest toEqual bug in ReactTreeTraversal ![image](https://cloud.githubusercontent.com/assets/6820/19879640/1cd7595a-9fb2-11e6-94ac-8c38bdfc90d3.png) * Track passing/failing tests in fiber Run scripts/fiber/record-tests to re-record, then check git diff to see what you changed.

Ben Alpert committed Oct 31, 2016 at 23:26 UTC 08b4cc53b8361d0414e3d522a6c5ce1e5328bb8c
7 files changed +1952 -32
.travis.yml
+7
@@ -94,6 +94,13 @@ script:
94 node scripts/facts-tracker/index.js \
95 "fiber-tests" "$FIBER_TESTS"
96
97 + # Should consolidate this with the above fiber run
98 + echo 'Testing in fiber mode against test records...'
99 + scripts/fiber/record-tests
100 + git --no-pager diff scripts/fiber
101 + FIBER_TESTS_STATUS=$(git status --porcelain scripts/fiber)
102 + test -z "$FIBER_TESTS_STATUS"
103 +
104 ./node_modules/.bin/gulp react:extract-errors
105 elif [ "$TEST_TYPE" = flow ]; then
106 set -e
package.json
+2
@@ -59,6 +59,8 @@
59 "gulp-util": "^3.0.7",
60 "gzip-js": "~0.3.2",
61 "jest": "^15.1.1",
62 + "jest-config": "^15.1.1",
63 + "jest-runtime": "^15.1.1",
64 "loose-envify": "^1.1.0",
65 "merge-stream": "^1.0.0",
66 "object-assign": "^4.1.0",
scripts/fiber/record-tests new
+73
@@ -0,0 +1,73 @@
1 +#!/usr/bin/env node
2 +
3 +const fs = require('fs');
4 +const os = require('os');
5 +const path = require('path');
6 +
7 +const SearchSource = require('jest').SearchSource;
8 +const TestRunner = require('jest').TestRunner;
9 +
10 +const createHasteContext = require('jest-runtime').createHasteContext;
11 +const readConfig = require('jest-config').readConfig;
12 +
13 +const argv = {};
14 +const root = path.normalize(path.join(__dirname, '..', '..'));
15 +const testPathPattern = '';
16 +
17 +function runJest() {
18 + return readConfig(argv, root)
19 + .then((config) => {
20 + return createHasteContext(config, {}).then((hasteMap) => {
21 + const source = new SearchSource(hasteMap, config);
22 + return source.getTestPaths({testPathPattern})
23 + .then((data) => {
24 + const runner = new TestRunner(
25 + hasteMap,
26 + config,
27 + {
28 + maxWorkers: Math.max(os.cpus().length - 1, 1),
29 + getTestSummary: () => 'You did it!'
30 + }
31 + );
32 + return runner.runTests(data.paths);
33 + });
34 + });
35 + });
36 +}
37 +
38 +function formatResults(runResults, predicate) {
39 + const formatted = [];
40 + runResults.testResults.forEach((fileResult) => {
41 + const file = path.relative(root, fileResult.testFilePath);
42 + const tests = fileResult.testResults.filter(
43 + (test) => predicate(fileResult, test)
44 + );
45 + if (tests.length) {
46 + const lines = [file].concat(tests.map((test) => '* ' + test.title));
47 + formatted.push(lines.join('\n'));
48 + }
49 + });
50 + formatted.sort();
51 + return formatted.join('\n\n');
52 +}
53 +
54 +process.env.REACT_DOM_JEST_USE_FIBER = true;
55 +runJest()
56 + .then((runResults) => {
57 + const passing = formatResults(
58 + runResults,
59 + (file, test) => test.status === 'passed'
60 + );
61 + const failing = formatResults(
62 + runResults,
63 + (file, test) => test.status === 'failed'
64 + );
65 + fs.writeFileSync(
66 + path.join(__dirname, 'tests-passing.txt'),
67 + passing + '\n'
68 + );
69 + fs.writeFileSync(
70 + path.join(__dirname, 'tests-failing.txt'),
71 + failing + '\n'
72 + );
73 + });
scripts/fiber/tests-failing.txt new
+628
@@ -0,0 +1,628 @@
1 +src/addons/__tests__/ReactComponentWithPureRenderMixin-test.js
2 +* does not do a deep comparison
3 +
4 +src/addons/__tests__/ReactFragment-test.js
5 +* should throw if a plain object is used as a child
6 +* should throw if a plain object even if it is in an owner
7 +* should throw if a plain object looks like an old element
8 +
9 +src/addons/__tests__/renderSubtreeIntoContainer-test.js
10 +* should pass context when rendering subtree elsewhere
11 +* should update context if it changes due to setState
12 +* should update context if it changes due to re-render
13 +
14 +src/addons/transitions/__tests__/ReactCSSTransitionGroup-test.js
15 +* should clean-up silently after the timeout elapses
16 +* should keep both sets of DOM nodes around
17 +* should switch transitionLeave from false to true
18 +* should transition from one to null
19 +* should transition from false to one
20 +
21 +src/addons/transitions/__tests__/ReactTransitionGroup-test.js
22 +* should warn for duplicated keys with component stack info
23 +
24 +src/isomorphic/classic/__tests__/ReactContextValidator-test.js
25 +* should filter out context not in contextTypes
26 +* should filter context properly in callbacks
27 +* should check context types
28 +* should check child context types
29 +
30 +src/isomorphic/classic/class/__tests__/ReactBind-test.js
31 +* Holds reference to instance
32 +* works with mixins
33 +
34 +src/isomorphic/classic/class/__tests__/ReactBindOptout-test.js
35 +* should work with manual binding
36 +* works with mixins that have not opted out of autobinding
37 +* works with mixins that have opted out of autobinding
38 +
39 +src/isomorphic/classic/class/__tests__/ReactClass-test.js
40 +* renders based on context getInitialState
41 +
42 +src/isomorphic/classic/element/__tests__/ReactElementClone-test.js
43 +* should check declared prop types after clone
44 +
45 +src/isomorphic/classic/element/__tests__/ReactElementValidator-test.js
46 +* warns for keys with component stack info
47 +* should give context for PropType errors in nested components.
48 +* includes the owner name when passing null, undefined, boolean, or number
49 +
50 +src/isomorphic/modern/class/__tests__/ReactCoffeeScriptClass-test.coffee
51 +* throws if no render function is defined
52 +* renders based on context in the constructor
53 +* should throw with non-object in the initial state property
54 +* warns when classic properties are defined on the instance, but does not invoke them.
55 +* should warn when misspelling shouldComponentUpdate
56 +* should warn when misspelling componentWillReceiveProps
57 +* supports this.context passed via getChildContext
58 +
59 +src/isomorphic/modern/class/__tests__/ReactES6Class-test.js
60 +* throws if no render function is defined
61 +* renders based on context in the constructor
62 +* should throw with non-object in the initial state property
63 +* warns when classic properties are defined on the instance, but does not invoke them.
64 +* should warn when misspelling shouldComponentUpdate
65 +* should warn when misspelling componentWillReceiveProps
66 +* supports this.context passed via getChildContext
67 +
68 +src/isomorphic/modern/class/__tests__/ReactTypeScriptClass-test.ts
69 +* throws if no render function is defined
70 +* renders based on context in the constructor
71 +* should throw with non-object in the initial state property
72 +* warns when classic properties are defined on the instance, but does not invoke them.
73 +* should warn when misspelling shouldComponentUpdate
74 +* should warn when misspelling componentWillReceiveProps
75 +* supports this.context passed via getChildContext
76 +
77 +src/isomorphic/modern/element/__tests__/ReactJSXElementValidator-test.js
78 +* should give context for PropType errors in nested components.
79 +* should warn on invalid context types
80 +
81 +src/renderers/art/__tests__/ReactART-test.js
82 +* should have the correct lifecycle state
83 +* should render a reasonable SVG structure in SVG mode
84 +* should be able to reorder components
85 +* should be able to reorder many components
86 +* renders composite with lifecycle inside group
87 +* resolves refs before componentDidMount
88 +* resolves refs before componentDidUpdate
89 +
90 +src/renderers/dom/shared/__tests__/CSSPropertyOperations-test.js
91 +* should set style attribute when styles exist
92 +* should warn when using hyphenated style names
93 +* should warn when updating hyphenated style names
94 +* warns when miscapitalizing vendored style names
95 +* should warn about style having a trailing semicolon
96 +* should warn about style containing a NaN value
97 +
98 +src/renderers/dom/shared/__tests__/ReactBrowserEventEmitter-test.js
99 +* should store a listener correctly
100 +* should retrieve a listener correctly
101 +* should clear all handlers when asked to
102 +* should invoke a simple handler registered on a node
103 +* should not invoke handlers if ReactBrowserEventEmitter is disabled
104 +* should bubble simply
105 +* should continue bubbling if an error is thrown
106 +* should set currentTarget
107 +* should support stopPropagation()
108 +* should stop after first dispatch if stopPropagation
109 +* should not stopPropagation if false is returned
110 +* should invoke handlers that were removed while bubbling
111 +* should not invoke newly inserted handlers while bubbling
112 +* should have mouse enter simulated by test utils
113 +* should infer onTouchTap from a touchStart/End
114 +* should infer onTouchTap from when dragging below threshold
115 +* should not onTouchTap from when dragging beyond threshold
116 +* should listen to events only once
117 +* should work with event plugins without dependencies
118 +* should work with event plugins with dependencies
119 +* should bubble onTouchTap
120 +
121 +src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
122 +* should handle className
123 +* should gracefully handle various style value types
124 +* should update styles when mutating style object
125 +* should warn when mutating style
126 +* should warn for unknown prop
127 +* should group multiple unknown prop warnings together
128 +* should warn for onDblClick prop
129 +* should warn nicely about NaN in style
130 +* should update styles if initially null
131 +* should update styles if updated to null multiple times
132 +* should remove attributes
133 +* should remove properties
134 +* should properly update custom attributes on custom elements
135 +* should clear a single style prop when changing `style`
136 +* should reject attribute key injection attack on markup
137 +* should reject attribute key injection attack on update
138 +* should update arbitrary attributes for tags containing dashes
139 +* should update styles when `style` changes from null to object
140 +* should empty element when removing innerHTML
141 +* should transition from string content to innerHTML
142 +* should transition from innerHTML to string content
143 +* should transition from innerHTML to children in nested el
144 +* should transition from children to innerHTML in nested el
145 +* should not incur unnecessary DOM mutations for attributes
146 +* should not incur unnecessary DOM mutations for string properties
147 +* should not incur unnecessary DOM mutations for boolean properties
148 +* should ignore attribute whitelist for elements with the "is: attribute
149 +* should not update when switching between null/undefined
150 +* should work error event on <source> element
151 +* should warn against children for void elements
152 +* should warn against dangerouslySetInnerHTML for void elements
153 +* should emit a warning once for a named custom component using shady DOM
154 +* should emit a warning once for an unnamed custom component using shady DOM
155 +* should treat menuitem as a void element but still create the closing tag
156 +* should validate against multiple children props
157 +* should validate against use of innerHTML
158 +* should validate use of dangerouslySetInnerHTML
159 +* should validate use of dangerouslySetInnerHTML
160 +* should warn about contentEditable and children
161 +* should validate against invalid styles
162 +* should track input values
163 +* should track textarea values
164 +* should execute custom event plugin listening behavior
165 +* should handle null and missing properly with event hooks
166 +* should warn for children on void elements
167 +* should support custom elements which extend native elements
168 +* should warn against children for void elements
169 +* should warn against dangerouslySetInnerHTML for void elements
170 +* should validate against multiple children props
171 +* should warn about contentEditable and children
172 +* should validate against invalid styles
173 +* should report component containing invalid styles
174 +* should clean up listeners
175 +* should clean up input value tracking
176 +* should clean up input textarea tracking
177 +* should warn about the `onScroll` issue when unsupported (IE8)
178 +* should throw when an invalid tag name is used
179 +* should throw when an attack vector is used
180 +* warns on invalid nesting
181 +* warns on invalid nesting at root
182 +* warns nicely for table rows
183 +* gives useful context in warnings
184 +* should warn about incorrect casing on properties (ssr)
185 +* should warn about incorrect casing on event handlers (ssr)
186 +* should warn about incorrect casing on properties
187 +* should warn about incorrect casing on event handlers
188 +* should warn about class
189 +* should warn about props that are no longer supported
190 +* gives source code refs for unknown prop warning
191 +* gives source code refs for unknown prop warning for update render
192 +* gives source code refs for unknown prop warning for exact elements
193 +* gives source code refs for unknown prop warning for exact elements in composition
194 +* should suggest property name if available
195 +
196 +src/renderers/dom/shared/__tests__/ReactDOMComponentTree-test.js
197 +* finds instances for nodes
198 +
199 +src/renderers/dom/shared/__tests__/ReactDOMInvalidARIAHook-test.js
200 +* should warn for one invalid aria-* prop
201 +* should warn for many invalid aria-* props
202 +* should warn for an improperly cased aria-* prop
203 +
204 +src/renderers/dom/shared/__tests__/ReactDOMTextComponent-test.js
205 +* updates a mounted text component in place
206 +* can be toggled in and out of the markup
207 +* can reconcile text merged by Node.normalize()
208 +* can reconcile text arbitrarily split into multiple nodes
209 +
210 +src/renderers/dom/shared/__tests__/ReactEventIndependence-test.js
211 +* does not crash with other react inside
212 +* does not crash with other react outside
213 +* does not when event fired on unmounted tree
214 +
215 +src/renderers/dom/shared/__tests__/ReactEventListener-test.js
216 +* should propagate events one level down
217 +* should propagate events two levels down
218 +* should not get confused by disappearing elements
219 +* should batch between handlers from different roots
220 +
221 +src/renderers/dom/shared/__tests__/inputValueTracking-test.js
222 +* should return tracker from node
223 +
224 +src/renderers/dom/shared/eventPlugins/__tests__/ChangeEventPlugin-test.js
225 +* should fire change for checkbox input
226 +* should catch setting the value programmatically
227 +* should not fire change when setting the value programmatically
228 +* should not fire change when setting checked programmatically
229 +* should only fire change for checked radio button once
230 +* should deduplicate input value change events
231 +* should listen for both change and input events when supported
232 +* should only fire events when the value changes for range inputs
233 +
234 +src/renderers/dom/shared/eventPlugins/__tests__/EnterLeaveEventPlugin-test.js
235 +* should set relatedTarget properly in iframe
236 +
237 +src/renderers/dom/shared/eventPlugins/__tests__/SelectEventPlugin-test.js
238 +* should extract if an `onSelect` listener is present
239 +
240 +src/renderers/dom/shared/eventPlugins/__tests__/SimpleEventPlugin-test.js
241 +* A non-interactive tags click when disabled
242 +* A non-interactive tags clicks bubble when disabled
243 +* should forward clicks when it starts out not disabled
244 +* should not forward clicks when it starts out disabled
245 +* should forward clicks when it becomes not disabled
246 +* should not forward clicks when it becomes disabled
247 +* should work correctly if the listener is changed
248 +* should forward clicks when it starts out not disabled
249 +* should not forward clicks when it starts out disabled
250 +* should forward clicks when it becomes not disabled
251 +* should not forward clicks when it becomes disabled
252 +* should work correctly if the listener is changed
253 +* should forward clicks when it starts out not disabled
254 +* should not forward clicks when it starts out disabled
255 +* should forward clicks when it becomes not disabled
256 +* should not forward clicks when it becomes disabled
257 +* should work correctly if the listener is changed
258 +* should forward clicks when it starts out not disabled
259 +* should not forward clicks when it starts out disabled
260 +* should forward clicks when it becomes not disabled
261 +* should not forward clicks when it becomes disabled
262 +* should work correctly if the listener is changed
263 +
264 +src/renderers/dom/shared/wrappers/__tests__/ReactDOMIframe-test.js
265 +* should trigger load events
266 +
267 +src/renderers/dom/shared/wrappers/__tests__/ReactDOMInput-test.js
268 +* should display `defaultValue` of number 0
269 +* should display "true" for `defaultValue` of `true`
270 +* should display "false" for `defaultValue` of `false`
271 +* should update `defaultValue` for uncontrolled input
272 +* should update `defaultValue` for uncontrolled date/time input
273 +* should take `defaultValue` when changing to uncontrolled input
274 +* should render name attribute if it is supplied
275 +* should display "foobar" for `defaultValue` of `objToString`
276 +* should display `value` of number 0
277 +* should allow setting `value` to `true`
278 +* should allow setting `value` to `false`
279 +* should allow setting `value` to `objToString`
280 +* should not incur unnecessary DOM mutations
281 +* should properly control a value of number `0`
282 +* should have the correct target value
283 +* should control radio buttons
284 +* should warn with value and no onChange handler and readOnly specified
285 +* should warn with checked and no onChange handler with readOnly specified
286 +* should warn if value is null
287 +* should warn if checked and defaultChecked props are specified
288 +* should warn if value and defaultValue props are specified
289 +* should warn if controlled input switches to uncontrolled (value is undefined)
290 +* should warn if controlled input switches to uncontrolled (value is null)
291 +* should warn if controlled input switches to uncontrolled with defaultValue
292 +* should warn if uncontrolled input (value is undefined) switches to controlled
293 +* should warn if uncontrolled input (value is null) switches to controlled
294 +* should warn if controlled checkbox switches to uncontrolled (checked is undefined)
295 +* should warn if controlled checkbox switches to uncontrolled (checked is null)
296 +* should warn if controlled checkbox switches to uncontrolled with defaultChecked
297 +* should warn if uncontrolled checkbox (checked is undefined) switches to controlled
298 +* should warn if uncontrolled checkbox (checked is null) switches to controlled
299 +* should warn if controlled radio switches to uncontrolled (checked is undefined)
300 +* should warn if controlled radio switches to uncontrolled (checked is null)
301 +* should warn if controlled radio switches to uncontrolled with defaultChecked
302 +* should warn if uncontrolled radio (checked is undefined) switches to controlled
303 +* should warn if uncontrolled radio (checked is null) switches to controlled
304 +* should warn if radio checked false changes to become uncontrolled
305 +* sets type, step, min, max before value always
306 +* sets value properly with type coming later in props
307 +* does not raise a validation warning when it switches types
308 +* resets value of date/time input to fix bugs in iOS Safari
309 +
310 +src/renderers/dom/shared/wrappers/__tests__/ReactDOMOption-test.js
311 +* should ignore and warn invalid children types
312 +* should be able to use dangerouslySetInnerHTML on option
313 +* should set attribute for empty value
314 +* should allow ignoring `value` on option
315 +
316 +src/renderers/dom/shared/wrappers/__tests__/ReactDOMSelect-test.js
317 +* should allow setting `defaultValue`
318 +* should not control when using `defaultValue`
319 +* should allow setting `defaultValue` with multiple
320 +* should allow setting `value`
321 +* should allow setting `value` with multiple
322 +* should not select other options automatically
323 +* should reset child options selected when they are changed and `value` is set
324 +* should allow setting `value` with `objectToString`
325 +* should allow switching to multiple
326 +* should allow switching from multiple
327 +* should remember value when switching to uncontrolled
328 +* should remember updated value when switching to uncontrolled
329 +* should not control defaultValue if readding options
330 +* should warn if value is null
331 +* should refresh state on change
332 +* should warn if value and defaultValue props are specified
333 +* should select grandchild options nested inside an optgroup
334 +
335 +src/renderers/dom/shared/wrappers/__tests__/ReactDOMTextarea-test.js
336 +* should allow setting `defaultValue`
337 +* should display `defaultValue` of number 0
338 +* should display "false" for `defaultValue` of `false`
339 +* should display "foobar" for `defaultValue` of `objToString`
340 +* should set defaultValue
341 +* should display `value` of number 0
342 +* should allow setting `value` to `giraffe`
343 +* should allow setting `value` to `true`
344 +* should allow setting `value` to `false`
345 +* should allow setting `value` to `objToString`
346 +* should take updates to `defaultValue` for uncontrolled textarea
347 +* should take updates to children in lieu of `defaultValue` for uncontrolled textarea
348 +* should not incur unnecessary DOM mutations
349 +* should properly control a value of number `0`
350 +* should treat children like `defaultValue`
351 +* should keep value when switching to uncontrolled element if not changed
352 +* should keep value when switching to uncontrolled element if changed
353 +* should allow numbers as children
354 +* should allow booleans as children
355 +* should allow objects as children
356 +* should throw with multiple or invalid children
357 +* should warn if value is null
358 +* should warn if value and defaultValue are specified
359 +
360 +src/renderers/dom/stack/client/__tests__/ReactDOM-test.js
361 +* throws in render() if the mount callback is not a function
362 +* throws in render() if the update callback is not a function
363 +
364 +src/renderers/dom/stack/client/__tests__/ReactMount-test.js
365 +* throws when given a non-node
366 +* throws when given a string
367 +* throws when given a factory
368 +* should account for escaping on a checksum mismatch
369 +* should warn if render removes React-rendered children
370 +* should warn if the unmounted node was rendered by another copy of React
371 +* passes the correct callback context
372 +* tracks root instances
373 +* marks top-level mounts
374 +
375 +src/renderers/dom/stack/client/__tests__/ReactMountDestruction-test.js
376 +* should warn when unmounting a non-container root node
377 +* should warn when unmounting a non-container, non-root node
378 +
379 +src/renderers/dom/stack/client/__tests__/ReactRenderDocument-test.js
380 +* should be able to adopt server markup
381 +* should not be able to unmount component from document node
382 +* should not be able to switch root constructors
383 +* should be able to mount into document
384 +* should give helpful errors on state desync
385 +* should throw on full document render w/ no markup
386 +* supports findDOMNode on full-page components
387 +
388 +src/renderers/dom/stack/client/__tests__/findDOMNode-test.js
389 +* findDOMNode should reject random objects
390 +* findDOMNode should reject unmounted objects with render func
391 +
392 +src/renderers/dom/stack/server/__tests__/ReactServerRendering-test.js
393 +* should generate simple markup
394 +* should generate simple markup for self-closing tags
395 +* should generate simple markup for attribute with `>` symbol
396 +* should generate comment markup for component returns null
397 +* should not register event listeners
398 +* should render composite components
399 +* should only execute certain lifecycle methods
400 +* should have the correct mounting behavior
401 +* should not put checksum and React ID on components
402 +* should not put checksum and React ID on text components
403 +* should not register event listeners
404 +* should only execute certain lifecycle methods
405 +* allows setState in componentWillMount without using DOM
406 +* renders components with different batching strategies
407 +* warns with a no-op when an async setState is triggered
408 +* warns with a no-op when an async replaceState is triggered
409 +* warns with a no-op when an async forceUpdate is triggered
410 +* should warn when children are mutated during render
411 +
412 +src/renderers/shared/__tests__/ReactPerf-test.js
413 +* should count no-op update as waste
414 +* should count no-op update in child as waste
415 +* should include stats for components unmounted during measurement
416 +* should include lifecycle methods in measurements
417 +* should include render time of functional components
418 +* should not count time in a portal towards lifecycle method
419 +* should work when measurement starts during reconciliation
420 +
421 +src/renderers/shared/hooks/__tests__/ReactComponentTreeHook-test.js
422 +* uses displayName or Unknown for classic components
423 +* uses displayName, name, or ReactComponent for modern components
424 +* uses displayName, name, or Object for factory components
425 +* uses displayName, name, or StatelessComponent for functional components
426 +* reports a host tree correctly
427 +* reports a simple tree with composites correctly
428 +* reports a tree with composites correctly
429 +* ignores null children
430 +* ignores false children
431 +* reports text nodes as children
432 +* reports a single text node as a child
433 +* reports a single number node as a child
434 +* reports a zero as a child
435 +* skips empty nodes for multiple children
436 +* reports html content as no children
437 +* updates text of a single text child
438 +* updates from no children to a single text child
439 +* updates from a single text child to no children
440 +* updates from html content to a single text child
441 +* updates from a single text child to html content
442 +* updates from no children to multiple text children
443 +* updates from multiple text children to no children
444 +* updates from html content to multiple text children
445 +* updates from multiple text children to html content
446 +* updates from html content to no children
447 +* updates from no children to html content
448 +* updates from one text child to multiple text children
449 +* updates from multiple text children to one text child
450 +* updates text nodes when reordering
451 +* updates host nodes when reordering with keys
452 +* updates host nodes when reordering without keys
453 +* updates a single composite child of a different type
454 +* updates a single composite child of the same type
455 +* updates from no children to a single composite child
456 +* updates from a single composite child to no children
457 +* updates mixed children
458 +* updates with a host child
459 +* updates from null to a host child
460 +* updates from a host child to null
461 +* updates from a host child to a composite child
462 +* updates from a composite child to a host child
463 +* updates from null to a composite child
464 +* updates from a composite child to null
465 +* updates with a host child
466 +* updates from null to a host child
467 +* updates from a host child to null
468 +* updates from a host child to a composite child
469 +* updates from a composite child to a host child
470 +* updates from null to a composite child
471 +* updates from a composite child to null
472 +* tracks owner correctly
473 +* purges unmounted components automatically
474 +* reports update counts
475 +* does not report top-level wrapper as a root
476 +* registers inlined text nodes
477 +* gets created
478 +* can be retrieved by ID
479 +* works
480 +
481 +src/renderers/shared/hooks/__tests__/ReactHostOperationHistoryHook-test.js
482 +* gets recorded for host roots
483 +* gets recorded for composite roots
484 +* gets recorded when a native is mounted deeply instead of null
485 +* gets recorded during mount
486 +* gets recorded during an update
487 +* gets ignored if the styles are shallowly equal
488 +* gets recorded during mount
489 +* gets recorded during an update
490 +* gets recorded as a removal during an update
491 +* gets recorded during mount
492 +* gets recorded during an update
493 +* gets recorded during mount
494 +* gets recorded during an update
495 +* gets recorded during an update from text content
496 +* gets recorded during an update from html
497 +* gets recorded during an update from children
498 +* gets recorded during an update
499 +* gets recorded when composite renders to a different type
500 +* gets recorded when composite renders to null after a native
501 +* gets recorded during an update from text content
502 +* gets recorded during an update from html
503 +* gets recorded during an update from children
504 +* gets reported when a child is inserted
505 +* gets reported when a child is inserted
506 +* gets reported when a child is removed
507 +
508 +src/renderers/shared/shared/__tests__/ReactTreeTraversal-test.js
509 +* should traverse two phase across component boundary
510 +* should traverse two phase at shallowest node
511 +* should traverse enter/leave to sibling - avoids parent
512 +* should traverse enter/leave to parent - avoids parent
513 +* should enter from the window
514 +* should enter from the window to the shallowest
515 +* should leave to the window
516 +* should leave to the window from the shallowest
517 +
518 +src/renderers/shared/stack/reconciler/__tests__/ReactChildReconciler-test.js
519 +* warns for duplicated keys
520 +* warns for duplicated keys with component stack info
521 +
522 +src/renderers/shared/stack/reconciler/__tests__/ReactComponent-test.js
523 +* should throw on invalid render targets
524 +* should throw when supplying a ref outside of render method
525 +* throws usefully when rendering badly-typed elements
526 +
527 +src/renderers/shared/stack/reconciler/__tests__/ReactComponentLifeCycle-test.js
528 +* should correctly determine if a component is mounted
529 +* should correctly determine if a null component is mounted
530 +* warns if findDOMNode is used inside render
531 +* should carry through each of the phases of setup
532 +
533 +src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponent-test.js
534 +* should not thrash a server rendered layout with client side one
535 +* should react to state changes from callbacks
536 +* should warn about `forceUpdate` on unmounted components
537 +* should warn about `setState` on unmounted components
538 +* should warn about `setState` in render
539 +* should warn about `setState` in getChildContext
540 +* should warn when shouldComponentUpdate() returns undefined
541 +* should warn when componentDidUnmount method is defined
542 +* should pass context to children when not owner
543 +* should pass context when re-rendered for static child
544 +* should pass context when re-rendered for static child within a composite component
545 +* should pass context transitively
546 +* should pass context when re-rendered
547 +* unmasked context propagates through updates
548 +* should trigger componentWillReceiveProps for context changes
549 +* should disallow nested render calls
550 +* should update refs if shouldComponentUpdate gives false
551 +* should support objects with prototypes as state
552 +* should warn when mutated props are passed
553 +
554 +src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponentNestedState-test.js
555 +* should provide up to date values for props
556 +
557 +src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponentState-test.js
558 +* should support setting state
559 +
560 +src/renderers/shared/stack/reconciler/__tests__/ReactEmptyComponent-test.js
561 +* should still throw when rendering to undefined
562 +* should be able to switch between rendering null and a normal tag
563 +* should be able to switch in a list of children
564 +* should distinguish between a script placeholder and an actual script tag
565 +* throws when rendering null at the top level
566 +* preserves the dom node during updates
567 +
568 +src/renderers/shared/stack/reconciler/__tests__/ReactMultiChild-test.js
569 +* should warn for duplicated keys with component stack info
570 +
571 +src/renderers/shared/stack/reconciler/__tests__/ReactMultiChildReconcile-test.js
572 +* should insert non-empty children in middle where nulls were
573 +
574 +src/renderers/shared/stack/reconciler/__tests__/ReactMultiChildText-test.js
575 +* should correctly handle all possible children for render and update
576 +* should throw if rendering both HTML and children
577 +* should reorder keyed text nodes
578 +
579 +src/renderers/shared/stack/reconciler/__tests__/ReactStatelessComponent-test.js
580 +* should pass context thru stateless component
581 +* should warn for childContextTypes on a functional component
582 +* should warn when stateless component returns array
583 +* should throw on string refs in pure functions
584 +* should warn when given a ref
585 +* should receive context
586 +* should warn when using non-React functions in JSX
587 +
588 +src/renderers/shared/stack/reconciler/__tests__/ReactUpdates-test.js
589 +* should batch state when updating state twice
590 +* should batch state when updating two different state keys
591 +* should batch state and props together
592 +* should batch parent/child state updates together
593 +* should batch child/parent state updates together
594 +* should support chained state updates
595 +* should batch forceUpdate together
596 +* should update children even if parent blocks updates
597 +* should flow updates correctly
598 +* should share reconcile transaction across different roots
599 +* should queue mount-ready handlers across different roots
600 +* should flush updates in the correct order
601 +* should flush updates in the correct order across roots
602 +* should queue updates from during mount
603 +* calls asap callbacks properly
604 +* calls asap callbacks with queued updates
605 +* does not call render after a component as been deleted
606 +* marks top-level updates
607 +* throws in setState if the update callback is not a function
608 +* throws in replaceState if the update callback is not a function
609 +* throws in forceUpdate if the update callback is not a function
610 +* does not update one component twice in a batch (#2410)
611 +* unstable_batchedUpdates should return value from a callback
612 +
613 +src/renderers/shared/stack/reconciler/__tests__/refs-test.js
614 +* Should increase refs with an increase in divs
615 +
616 +src/shared/utils/__tests__/traverseAllChildren-test.js
617 +* should warn for using maps as children with owner info
618 +
619 +src/test/__tests__/ReactTestUtils-test.js
620 +* traverses children in the correct order
621 +* should support injected wrapper components as DOM components
622 +* should change the value of an input field
623 +* should change the value of an input field in a component
624 +* can scry with stateless components involved
625 +* should set the type of the event
626 +
627 +src/test/__tests__/reactComponentExpect-test.js
628 +* should detect text components
scripts/fiber/tests-passing.txt new
+1204
@@ -0,0 +1,1204 @@
1 +eslint-rules/__tests__/warning-and-invariant-args-test.js
2 +* warning(true, 'hello, world');
3 +* warning(true, 'expected %s, got %s', 42, 24);
4 +* invariant(true, 'hello, world');
5 +* invariant(true, 'expected %s, got %s', 42, 24);
6 +* warning('hello, world');
7 +* warning(true, null);
8 +* var g = 5; invariant(true, g);
9 +* warning(true, 'expected %s, got %s');
10 +* warning(true, 'foo is a bar under foobar', 'junk argument');
11 +* invariant(true, 'error!');
12 +* warning(true, 'error!');
13 +* warning(true, '%s %s, %s %s: %s (%s)', 1, 2, 3, 4, 5, 6);
14 +
15 +scripts/error-codes/__tests__/dev-expression-with-codes-test.js
16 +* should replace __DEV__ in if
17 +* should replace warning calls
18 +* should add `reactProdInvariant` when it finds `require('invariant')`
19 +* should replace simple invariant calls
20 +* should only add `reactProdInvariant` once
21 +* should support invariant calls with args
22 +* should support invariant calls with a concatenated template string and args
23 +* should warn in non-test envs if the error message cannot be found
24 +* should not warn in test env if the error message cannot be found
25 +
26 +scripts/error-codes/__tests__/evalToString-test.js
27 +* should support StringLiteral
28 +* should support string concat (`+`)
29 +* should throw when it finds other types
30 +
31 +scripts/error-codes/__tests__/invertObject-test.js
32 +* should return an empty object for an empty input
33 +* should invert key-values
34 +* should take the last value when there're duplications in vals
35 +* should perserve the original order
36 +
37 +src/addons/__tests__/ReactComponentWithPureRenderMixin-test.js
38 +* provides a default shouldComponentUpdate implementation
39 +
40 +src/addons/__tests__/ReactFragment-test.js
41 +* warns for numeric keys on objects as children
42 +* should warn if passing null to createFragment
43 +* should warn if passing an array to createFragment
44 +* should warn if passing a ReactElement to createFragment
45 +
46 +src/addons/__tests__/renderSubtreeIntoContainer-test.js
47 +* should throw if parentComponent is invalid
48 +
49 +src/addons/__tests__/update-test.js
50 +* pushes
51 +* does not mutate the original object
52 +* only pushes an array
53 +* only pushes unto an array
54 +* unshifts
55 +* does not mutate the original object
56 +* only unshifts an array
57 +* only unshifts unto an array
58 +* splices
59 +* does not mutate the original object
60 +* only splices an array of arrays
61 +* only splices unto an array
62 +* merges
63 +* does not mutate the original object
64 +* only merges with an object
65 +* only merges with an object
66 +* sets
67 +* does not mutate the original object
68 +* applies
69 +* does not mutate the original object
70 +* only applies a function
71 +* should support deep updates
72 +* should require a command
73 +* should perform safe hasOwnProperty check
74 +
75 +src/addons/transitions/__tests__/ReactCSSTransitionGroup-test.js
76 +* should warn if timeouts aren't specified
77 +* should not warn if timeouts is zero
78 +* should work with no children
79 +* should work with a null child
80 +* should use transition-type specific names when they're provided
81 +* should clear transition timeouts when unmounted
82 +* should handle unmounted elements properly
83 +
84 +src/addons/transitions/__tests__/ReactTransitionChildMapping-test.js
85 +* should support getChildMapping
86 +* should support mergeChildMappings for adding keys
87 +* should support mergeChildMappings for removing keys
88 +* should support mergeChildMappings for adding and removing
89 +* should reconcile overlapping insertions and deletions
90 +* should support mergeChildMappings with undefined input
91 +
92 +src/addons/transitions/__tests__/ReactTransitionGroup-test.js
93 +* should handle willEnter correctly
94 +* should handle enter/leave/enter/leave correctly
95 +* should handle enter/leave/enter correctly
96 +* should handle entering/leaving several elements at once
97 +
98 +src/isomorphic/children/__tests__/ReactChildren-test.js
99 +* should support identity for simple
100 +* should treat single arrayless child as being in array
101 +* should treat single child in array as expected
102 +* should pass key to returned component
103 +* should invoke callback with the right context
104 +* should be called for each child
105 +* should be called for each child in nested structure
106 +* should retain key across two mappings
107 +* should not throw if key provided is a dupe with array key
108 +* should use the same key for a cloned element
109 +* should use the same key for a cloned element with key
110 +* should return 0 for null children
111 +* should return 0 for undefined children
112 +* should return 1 for single child
113 +* should count the number of children in flat structure
114 +* should count the number of children in nested structure
115 +* should flatten children to an array
116 +
117 +src/isomorphic/children/__tests__/onlyChild-test.js
118 +* should fail when passed two children
119 +* should fail when passed nully values
120 +* should fail when key/value objects
121 +* should not fail when passed interpolated single child
122 +* should return the only child
123 +
124 +src/isomorphic/children/__tests__/sliceChildren-test.js
125 +* should render the whole set if start zero is supplied
126 +* should render the remaining set if no end index is supplied
127 +* should exclude everything at or after the end index
128 +* should allow static children to be sliced
129 +* should slice nested children
130 +
131 +src/isomorphic/classic/class/__tests__/ReactBind-test.js
132 +* warns if you try to bind to this
133 +* does not warn if you pass an auto-bound method to setState
134 +
135 +src/isomorphic/classic/class/__tests__/ReactBindOptout-test.js
136 +* should not hold reference to instance
137 +* does not warn if you try to bind to this
138 +* does not warn if you pass an manually bound method to setState
139 +
140 +src/isomorphic/classic/class/__tests__/ReactClass-test.js
141 +* should throw when `render` is not specified
142 +* should copy `displayName` onto the Constructor
143 +* should copy prop types onto the Constructor
144 +* should warn on invalid prop types
145 +* should warn on invalid context types
146 +* should throw on invalid child context types
147 +* should warn when mispelling shouldComponentUpdate
148 +* should warn when mispelling componentWillReceiveProps
149 +* should throw if a reserved property is in statics
150 +* should support statics
151 +* should work with object getInitialState() return values
152 +* should throw with non-object getInitialState() return values
153 +* should work with a null getInitialState() return value
154 +* should throw when using legacy factories
155 +
156 +src/isomorphic/classic/class/__tests__/ReactClassMixin-test.js
157 +* should support merging propTypes and statics
158 +* should support chaining delegate functions
159 +* should chain functions regardless of spec property order
160 +* should validate prop types via mixins
161 +* should override mixin prop types with class prop types
162 +* should support mixins with getInitialState()
163 +* should throw with conflicting getInitialState() methods
164 +* should not mutate objects returned by getInitialState()
165 +* should support statics in mixins
166 +* should throw if mixins override each others' statics
167 +* should throw if mixins override functions in statics
168 +* should warn if the mixin is undefined
169 +* should warn if the mixin is null
170 +* should warn if an undefined mixin is included in another mixin
171 +* should warn if a null mixin is included in another mixin
172 +* should throw if the mixin is a React component
173 +* should throw if the mixin is a React component class
174 +* should have bound the mixin methods to the component
175 +* should include the mixin keys in even if their values are falsy
176 +* should work with a null getInitialState return value and a mixin
177 +
178 +src/isomorphic/classic/element/__tests__/ReactElement-test.js
179 +* uses the fallback value when in an environment without Symbol
180 +* returns a complete element according to spec
181 +* should warn when `key` is being accessed on createClass element
182 +* should warn when `key` is being accessed on ES class element
183 +* should warn when `key` is being accessed on a host element
184 +* should warn when `ref` is being accessed
185 +* allows a string to be passed as the type
186 +* returns an immutable element
187 +* does not reuse the original config object
188 +* does not fail if config has no prototype
189 +* extracts key and ref from the config
190 +* extracts null key and ref
191 +* ignores undefined key and ref
192 +* ignores key and ref warning getters
193 +* coerces the key to a string
194 +* preserves the owner on the element
195 +* merges an additional argument onto the children prop
196 +* does not override children if no rest args are provided
197 +* overrides children if null is provided as an argument
198 +* merges rest arguments onto the children prop in an array
199 +* allows static methods to be called using the type property
200 +* identifies valid elements
201 +* allows the use of PropTypes validators in statics
202 +* is indistinguishable from a plain object
203 +* should use default prop value when removing a prop
204 +* should normalize props with default values
205 +* throws when changing a prop (in dev) after element creation
206 +* throws when adding a prop (in dev) after element creation
207 +* does not warn for NaN props
208 +* identifies elements, but not JSON, if Symbols are supported
209 +* should scry children but cannot
210 +* does not maintain refs
211 +* can capture Child instantiation calls
212 +* can properly scry children
213 +* does not maintain refs
214 +* can capture Child instantiation calls
215 +* should scry children but cannot
216 +* does not maintain refs
217 +* can capture Child instantiation calls
218 +
219 +src/isomorphic/classic/element/__tests__/ReactElementClone-test.js
220 +* should clone a DOM component with new props
221 +* should clone a composite component with new props
222 +* does not fail if config has no prototype
223 +* should keep the original ref if it is not overridden
224 +* should transfer the key property
225 +* should transfer children
226 +* should shallow clone children
227 +* should accept children as rest arguments
228 +* should override children if undefined is provided as an argument
229 +* should support keys and refs
230 +* should steal the ref if a new ref is specified
231 +* should overwrite props
232 +* should normalize props with default values
233 +* warns for keys for arrays of elements in rest args
234 +* does not warns for arrays of elements with keys
235 +* does not warn when the element is directly in rest args
236 +* does not warn when the array contains a non-element
237 +* should ignore key and ref warning getters
238 +* should ignore undefined key and ref
239 +* should extract null key and ref
240 +
241 +src/isomorphic/classic/element/__tests__/ReactElementValidator-test.js
242 +* warns for keys for arrays of elements in rest args
243 +* warns for keys for arrays of elements with owner info
244 +* warns for keys for arrays with no owner or parent info
245 +* warns for keys for arrays of elements with no owner info
246 +* does not warn for keys when passing children down
247 +* warns for keys for iterables of elements in rest args
248 +* does not warns for arrays of elements with keys
249 +* does not warns for iterable elements with keys
250 +* does not warn when the element is directly in rest args
251 +* does not warn when the array contains a non-element
252 +* gives a helpful error when passing null, undefined, boolean, or number
253 +* should check default prop values
254 +* should not check the default for explicit null
255 +* should check declared prop types
256 +* should warn if a PropType creator is used as a PropType
257 +* should warn when accessing .type on an element factory
258 +* does not warn when using DOM node as children
259 +* should not enumerate enumerable numbers (#4776)
260 +* does not blow up with inlined children
261 +* does not blow up on key warning with undefined type
262 +
263 +src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js
264 +* should warn for invalid strings
265 +* should fail date and regexp correctly
266 +* should not warn for valid values
267 +* should be implicitly optional and not warn without values
268 +* should warn for missing required values
269 +* should should accept any value
270 +* should be implicitly optional and not warn without values
271 +* should warn for missing required values
272 +* should fail for invalid argument
273 +* should support the arrayOf propTypes
274 +* should support arrayOf with complex types
275 +* should warn with invalid items in the array
276 +* should warn with invalid complex types
277 +* should warn when passed something other than an array
278 +* should not warn when passing an empty array
279 +* should be implicitly optional and not warn without values
280 +* should warn for missing required values
281 +* should support components
282 +* should not support multiple components or scalar values
283 +* should be able to define a single child as label
284 +* should warn when passing no label and isRequired is set
285 +* should be implicitly optional and not warn without values
286 +* should warn for missing required values
287 +* should warn for invalid instances
288 +* should not warn for valid values
289 +* should be implicitly optional and not warn without values
290 +* should warn for missing required values
291 +* should warn for invalid values
292 +* should not warn for valid values
293 +* should not warn for iterables
294 +* should not warn for entry iterables
295 +* should not warn for null/undefined if not required
296 +* should warn for missing required values
297 +* should accept empty array for required props
298 +* should fail for invalid argument
299 +* should support the objectOf propTypes
300 +* should support objectOf with complex types
301 +* should warn with invalid items in the object
302 +* should warn with invalid complex types
303 +* should warn when passed something other than an object
304 +* should not warn when passing an empty object
305 +* should be implicitly optional and not warn without values
306 +* should warn for missing required values
307 +* should warn but not error for invalid argument
308 +* should warn for invalid values
309 +* should not warn for valid values
310 +* should be implicitly optional and not warn without values
311 +* should warn for missing required values
312 +* should warn but not error for invalid argument
313 +* should warn if none of the types are valid
314 +* should not warn if one of the types are valid
315 +* should be implicitly optional and not warn without values
316 +* should warn for missing required values
317 +* should warn for non objects
318 +* should not warn for empty values
319 +* should not warn for an empty object
320 +* should not warn for non specified types
321 +* should not warn for valid types
322 +* should warn for required valid types
323 +* should warn for the first required type
324 +* should warn for invalid key types
325 +* should be implicitly optional and not warn without values
326 +* should warn for missing required values
327 +* should warn for non-symbol
328 +* should not warn for a polyfilled Symbol
329 +* should have been called with the right params
330 +* should have been called even if the prop is not present
331 +* should have received the validator's return value
332 +* should not warn if the validator returned null
333 +
334 +src/isomorphic/classic/types/__tests__/ReactPropTypesProduction-test.js
335 +* should be a no-op
336 +* should be a no-op
337 +* should be a no-op
338 +* should be a no-op
339 +* should be a no-op
340 +* should be a no-op
341 +* should be a no-op
342 +* should be a no-op
343 +* should be a no-op
344 +* should be a no-op
345 +* should not have been called
346 +
347 +src/isomorphic/modern/class/__tests__/ReactClassEquivalence-test.js
348 +* tests the same thing for es6 classes and CoffeeScript
349 +* tests the same thing for es6 classes and TypeScript
350 +
351 +src/isomorphic/modern/class/__tests__/ReactCoffeeScriptClass-test.coffee
352 +* preserves the name of the class for use in error messages
353 +* renders a simple stateless component with prop
354 +* renders based on state using initial values in this.props
355 +* renders based on state using props in the constructor
356 +* renders only once when setting state in componentWillMount
357 +* should render with null in the initial state property
358 +* setState through an event handler
359 +* should not implicitly bind event handlers
360 +* renders using forceUpdate even when there is no state
361 +* will call all the normal life cycle methods
362 +* should throw AND warn when trying to access classic APIs
363 +* supports classic refs
364 +* supports drilling through to the DOM using findDOMNode
365 +
366 +src/isomorphic/modern/class/__tests__/ReactES6Class-test.js
367 +* preserves the name of the class for use in error messages
368 +* renders a simple stateless component with prop
369 +* renders based on state using initial values in this.props
370 +* renders based on state using props in the constructor
371 +* renders only once when setting state in componentWillMount
372 +* should render with null in the initial state property
373 +* setState through an event handler
374 +* should not implicitly bind event handlers
375 +* renders using forceUpdate even when there is no state
376 +* will call all the normal life cycle methods
377 +* should throw AND warn when trying to access classic APIs
378 +* supports classic refs
379 +* supports drilling through to the DOM using findDOMNode
380 +
381 +src/isomorphic/modern/class/__tests__/ReactPureComponent-test.js
382 +* should render
383 +* can override shouldComponentUpdate
384 +* extends React.Component
385 +
386 +src/isomorphic/modern/class/__tests__/ReactTypeScriptClass-test.ts
387 +* preserves the name of the class for use in error messages
388 +* renders a simple stateless component with prop
389 +* renders based on state using initial values in this.props
390 +* renders based on state using props in the constructor
391 +* renders only once when setting state in componentWillMount
392 +* should render with null in the initial state property
393 +* setState through an event handler
394 +* should not implicitly bind event handlers
395 +* renders using forceUpdate even when there is no state
396 +* will call all the normal life cycle methods
397 +* should throw AND warn when trying to access classic APIs
398 +* supports classic refs
399 +* supports drilling through to the DOM using findDOMNode
400 +
401 +src/isomorphic/modern/element/__tests__/ReactJSXElement-test.js
402 +* returns a complete element according to spec
403 +* allows a lower-case to be passed as the string type
404 +* allows a string to be passed as the type
405 +* returns an immutable element
406 +* does not reuse the object that is spread into props
407 +* extracts key and ref from the rest of the props
408 +* coerces the key to a string
409 +* merges JSX children onto the children prop
410 +* does not override children if no JSX children are provided
411 +* overrides children if null is provided as a JSX child
412 +* overrides children if undefined is provided as an argument
413 +* merges JSX children onto the children prop in an array
414 +* allows static methods to be called using the type property
415 +* identifies valid elements
416 +* is indistinguishable from a plain object
417 +* should use default prop value when removing a prop
418 +* should normalize props with default values
419 +
420 +src/isomorphic/modern/element/__tests__/ReactJSXElementValidator-test.js
421 +* warns for keys for arrays of elements in children position
422 +* warns for keys for arrays of elements with owner info
423 +* warns for keys for iterables of elements in rest args
424 +* does not warns for arrays of elements with keys
425 +* does not warns for iterable elements with keys
426 +* does not warn for numeric keys in entry iterable as a child
427 +* does not warn when the element is directly as children
428 +* does not warn when the child array contains non-elements
429 +* gives a helpful error when passing null, undefined, or boolean
430 +* should check default prop values
431 +* should not check the default for explicit null
432 +* should check declared prop types
433 +* should warn on invalid prop types
434 +* should warn if getDefaultProps is specificed on the class
435 +
436 +src/renderers/dom/__tests__/ReactDOMProduction-test.js
437 +* should use prod fbjs
438 +* should use prod React
439 +* should handle a simple flow
440 +* should call lifecycle methods
441 +* should throw with an error code in production
442 +
443 +src/renderers/dom/fiber/__tests__/ReactDOMFiber-test.js
444 +* should render strings as children
445 +* should render numbers as children
446 +* should be called a callback argument
447 +* should render a component returning strings directly from render
448 +* should render a component returning numbers directly from render
449 +* finds the DOM Text node of a string child
450 +* finds the first child when a component returns a fragment
451 +* finds the first child even when fragment is nested
452 +* finds the first child even when first child renders null
453 +
454 +src/renderers/dom/shared/__tests__/CSSProperty-test.js
455 +* should generate browser prefixes for its `isUnitlessNumber`
456 +
457 +src/renderers/dom/shared/__tests__/CSSPropertyOperations-test.js
458 +* should create markup for simple styles
459 +* should ignore undefined styles
460 +* should ignore null styles
461 +* should return null for no styles
462 +* should automatically append `px` to relevant styles
463 +* should trim values
464 +* should not append `px` to styles that might need a number
465 +* should create vendor-prefixed markup correctly
466 +* should not set style attribute when no styles exist
467 +
468 +src/renderers/dom/shared/__tests__/DOMPropertyOperations-test.js
469 +* should create markup for simple properties
470 +* should work with the id attribute
471 +* should create markup for boolean properties
472 +* should create markup for booleanish properties
473 +* should create markup for custom attributes
474 +* should create markup for numeric properties
475 +* should allow custom properties on web components
476 +* should set values as properties by default
477 +* should set values as attributes if necessary
478 +* should set values as namespace attributes if necessary
479 +* should set values as boolean properties
480 +* should convert attribute values to string first
481 +* should not remove empty attributes for special properties
482 +* should remove for falsey boolean properties
483 +* should remove when setting custom attr to null
484 +* should use mutation method where applicable
485 +* should set className to empty string instead of null
486 +* should remove property properly for boolean properties
487 +* should remove property properly even with different name
488 +* should remove attributes for normal properties
489 +* should not remove attributes for special properties
490 +* should not leave all options selected when deleting multiple
491 +* should support custom attributes
492 +
493 +src/renderers/dom/shared/__tests__/ReactBrowserEventEmitter-test.js
494 +* should not crash ensureScrollValueMonitoring when createEvent returns null
495 +
496 +src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
497 +* should not warn for "0" as a unitless style value
498 +* should skip reserved props on web components
499 +* should skip dangerouslySetInnerHTML on web components
500 +* should clear all the styles when removing `style`
501 +* handles multiple child updates without interference
502 +* should generate the correct markup with className
503 +* should escape style names and values
504 +* should handle dangerouslySetInnerHTML
505 +* should not duplicate uppercased selfclosing tags
506 +* should allow {__html: null}
507 +* should respect suppressContentEditableWarning
508 +* should properly escape text content and attributes values
509 +* unmounts children before unsetting DOM node info
510 +* should not warn when server-side rendering `onScroll`
511 +
512 +src/renderers/dom/shared/__tests__/ReactDOMComponentTree-test.js
513 +* finds nodes for instances
514 +
515 +src/renderers/dom/shared/__tests__/ReactDOMIDOperations-test.js
516 +* should update innerHTML and preserve whitespace
517 +
518 +src/renderers/dom/shared/__tests__/ReactDOMInvalidARIAHook-test.js
519 +* should allow valid aria-* props
520 +
521 +src/renderers/dom/shared/__tests__/ReactDOMSVG-test.js
522 +* creates initial namespaced markup
523 +
524 +src/renderers/dom/shared/__tests__/ReactDOMTextComponent-test.js
525 +* can reconcile text from pre-rendered markup
526 +
527 +src/renderers/dom/shared/__tests__/ReactEventListener-test.js
528 +* should dispatch events from outside React tree
529 +* should not fire duplicate events for a React DOM tree
530 +
531 +src/renderers/dom/shared/__tests__/escapeTextContentForBrowser-test.js
532 +* should escape boolean to string
533 +* should escape object to string
534 +* should escape number to string
535 +* should escape string
536 +
537 +src/renderers/dom/shared/__tests__/inputValueTracking-test.js
538 +* should attach tracker to wrapper state
539 +* should define `value` on the instance node
540 +* should define `checked` on the instance node
541 +* should initialize with the current value
542 +* should initialize with the current `checked`
543 +* should track value changes
544 +* should tracked`checked` changes
545 +* should update value manually
546 +* should coerce value to a string
547 +* should update value if it changed and return result
548 +* should track value and return true when updating untracked instance
549 +* should stop tracking
550 +
551 +src/renderers/dom/shared/__tests__/quoteAttributeValueForBrowser-test.js
552 +* should escape boolean to string
553 +* should escape object to string
554 +* should escape number to string
555 +* should escape string
556 +
557 +src/renderers/dom/shared/__tests__/validateDOMNesting-test.js
558 +* allows any tag with no context
559 +* allows valid nestings
560 +* prevents problematic nestings
561 +
562 +src/renderers/dom/shared/eventPlugins/__tests__/BeforeInputEventPlugin-test.js
563 +* extract onBeforeInput from native textinput events
564 +* extract onBeforeInput from fallback objects
565 +
566 +src/renderers/dom/shared/eventPlugins/__tests__/ChangeEventPlugin-test.js
567 +* should unmount
568 +
569 +src/renderers/dom/shared/eventPlugins/__tests__/FallbackCompositionState-test.js
570 +* extracts value via `getText()`
571 +* extracts when inserted at start of text
572 +* extracts when inserted within text
573 +* extracts when inserted at end of text
574 +* extracts when inserted at start of text
575 +* extracts when inserted within text
576 +* extracts when inserted at end of text
577 +
578 +src/renderers/dom/shared/eventPlugins/__tests__/SelectEventPlugin-test.js
579 +* should skip extraction if no listeners are present
580 +
581 +src/renderers/dom/shared/eventPlugins/__tests__/SimpleEventPlugin-test.js
582 +* does not add a local click to interactive elements
583 +* adds a local click listener to non-interactive elements
584 +
585 +src/renderers/dom/shared/syntheticEvents/__tests__/SyntheticClipboardEvent-test.js
586 +* returns event's clipboardData
587 +* normalizes properties from the Event interface
588 +* is able to `preventDefault` and `stopPropagation`
589 +* is able to `persist`
590 +
591 +src/renderers/dom/shared/syntheticEvents/__tests__/SyntheticEvent-test.js
592 +* should normalize `target` from the nativeEvent
593 +* should be able to `preventDefault`
594 +* should be prevented if nativeEvent is prevented
595 +* should be able to `stopPropagation`
596 +* should be able to `persist`
597 +* should be nullified if the synthetic event has called destructor and log warnings
598 +* should warn when setting properties of a destructored synthetic event
599 +* should warn if the synthetic event has been released when calling `preventDefault`
600 +* should warn if the synthetic event has been released when calling `stopPropagation`
601 +* should warn if Proxy is supported and the synthetic event is added a property
602 +
603 +src/renderers/dom/shared/syntheticEvents/__tests__/SyntheticKeyboardEvent-test.js
604 +* returns whatever getEventCharCode returns
605 +* returns 0
606 +* returns a passed keyCode
607 +* returns 0
608 +* returns whatever getEventCharCode returns
609 +* returns a passed keyCode
610 +* returns 0
611 +* normalizes properties from the Event interface
612 +* is able to `preventDefault` and `stopPropagation`
613 +* is able to `persist`
614 +
615 +src/renderers/dom/shared/syntheticEvents/__tests__/SyntheticWheelEvent-test.js
616 +* should normalize properties from the Event interface
617 +* should normalize properties from the MouseEvent interface
618 +* should normalize properties from the WheelEvent interface
619 +* should be able to `preventDefault` and `stopPropagation`
620 +* should be able to `persist`
621 +
622 +src/renderers/dom/shared/utils/__tests__/getEventCharCode-test.js
623 +* returns 13
624 +* returns charCode
625 +* returns 13
626 +* returns 0
627 +* returns keyCode
628 +* returns 13
629 +* returns 0
630 +
631 +src/renderers/dom/shared/utils/__tests__/getEventKey-test.js
632 +* returns a normalized value
633 +* returns a key
634 +* returns 'Enter'
635 +* returns a string from a charCode
636 +* returns a translated key
637 +* returns Unidentified
638 +* returns an empty string
639 +
640 +src/renderers/dom/shared/utils/__tests__/getNodeForCharacterOffset-test.js
641 +* should handle siblings
642 +* should handle trailing chars
643 +* should handle trees
644 +* should handle non-existent offset
645 +
646 +src/renderers/dom/shared/utils/__tests__/setInnerHTML-test.js
647 +* sets innerHTML on it
648 +
649 +src/renderers/dom/shared/wrappers/__tests__/ReactDOMInput-test.js
650 +* only assigns defaultValue if it changes
651 +* should render defaultValue for SSR
652 +* should render value for SSR
653 +* should render name attribute if it is supplied for SSR
654 +* should not render name attribute if it is not supplied
655 +* should not render name attribute if it is not supplied for SSR
656 +* should not set a value for submit buttons unnecessarily
657 +* should have a this value of undefined if bind is not used
658 +* should update defaultValue to empty string
659 +* should not warn if radio value changes but never becomes controlled
660 +* should not warn if radio value changes but never becomes uncontrolled
661 +
662 +src/renderers/dom/shared/wrappers/__tests__/ReactDOMOption-test.js
663 +* should flatten children to a string
664 +* should ignore null/undefined/false children without warning
665 +
666 +src/renderers/dom/shared/wrappers/__tests__/ReactDOMSelect-test.js
667 +* should not throw with `defaultValue` and without children
668 +* should not throw with `value` and without children
669 +* should support server-side rendering
670 +* should support server-side rendering with defaultValue
671 +* should support server-side rendering with multiple
672 +* should be able to safely remove select onChange
673 +
674 +src/renderers/dom/shared/wrappers/__tests__/ReactDOMTextarea-test.js
675 +* should not render value as an attribute
676 +* should update defaultValue to empty string
677 +* should render defaultValue for SSR
678 +* should render value for SSR
679 +* should unmount
680 +
681 +src/renderers/dom/stack/client/__tests__/ReactDOM-test.js
682 +* allows a DOM element to be used with a string
683 +* should allow children to be passed as an argument
684 +* should overwrite props.children with children argument
685 +* should purge the DOM cache when removing nodes
686 +* allow React.DOM factories to be called without warnings
687 +
688 +src/renderers/dom/stack/client/__tests__/ReactMount-test.js
689 +* should render different components in same root
690 +* should unmount and remount if the key changes
691 +* should reuse markup if rendering to the same target twice
692 +* should warn if mounting into dirty rendered markup
693 +* should not warn if mounting into non-empty node
694 +* should warn when mounting into document.body
695 +
696 +src/renderers/dom/stack/client/__tests__/ReactMountDestruction-test.js
697 +* should destroy a react root upon request
698 +
699 +src/renderers/dom/stack/client/__tests__/findDOMNode-test.js
700 +* findDOMNode should return null if passed null
701 +* findDOMNode should find dom element
702 +* findDOMNode should not throw an error when called within a component that is not mounted
703 +
704 +src/renderers/dom/stack/server/__tests__/ReactServerRendering-test.js
705 +* should throw with silly args
706 +* should throw with silly args
707 +
708 +src/renderers/native/__tests__/ReactNativeAttributePayload-test.js
709 +* should work with simple example
710 +* should skip fields that are equal
711 +* should remove fields
712 +* should remove fields that are set to undefined
713 +* should ignore invalid fields
714 +* should use the diff attribute
715 +* should not use the diff attribute on addition/removal
716 +* should do deep diffs of Objects by default
717 +* should work with undefined styles
718 +* should work with empty styles
719 +* should flatten nested styles and predefined styles
720 +* should reset a value to a previous if it is removed
721 +* should not clear removed props if they are still in another slot
722 +* should clear a prop if a later style is explicit null/undefined
723 +* should convert functions to booleans
724 +
725 +src/renderers/native/__tests__/ReactNativeEvents-test.js
726 +* handles events
727 +
728 +src/renderers/native/__tests__/ReactNativeMount-test.js
729 +* should be able to create and render a native component
730 +* should be able to create and update a native component
731 +
732 +src/renderers/shared/__tests__/ReactDebugTool-test.js
733 +* should add and remove hooks
734 +* warns once when an error is thrown in hook
735 +* returns isProfiling state
736 +
737 +src/renderers/shared/__tests__/ReactPerf-test.js
738 +* should not count initial render as waste
739 +* should not count unmount as waste
740 +* should not count content update as waste
741 +* should not count child addition as waste
742 +* should not count child removal as waste
743 +* should not count property update as waste
744 +* should not count style update as waste
745 +* should not count property removal as waste
746 +* should not count raw HTML update as waste
747 +* should not count child reordering as waste
748 +* should not count text update as waste
749 +* should not count replacing null with a host as waste
750 +* should not count replacing a host with null as waste
751 +* warns once when using getMeasurementsSummaryMap
752 +* warns once when using printDOM
753 +* returns isRunning state
754 +* start has no effect when already running
755 +* stop has no effect when already stopped
756 +* should print console error only once
757 +* should not print errant warnings if render() throws
758 +* should not print errant warnings if componentWillMount() throws
759 +* should not print errant warnings if componentDidMount() throws
760 +* should not print errant warnings if portal throws in render()
761 +* should not print errant warnings if portal throws in componentWillMount()
762 +* should not print errant warnings if portal throws in componentDidMount()
763 +
764 +src/renderers/shared/fiber/__tests__/ReactCoroutine-test.js
765 +* should render a coroutine
766 +
767 +src/renderers/shared/fiber/__tests__/ReactIncremental-test.js
768 +* should render a simple component
769 +* should render a simple component, in steps if needed
770 +* updates a previous render
771 +* can cancel partially rendered work and restart
772 +* can deprioritize unfinished work and resume it later
773 +* can deprioritize a tree from without dropping work
774 +* can resume work in a subtree even when a parent bails out
775 +* can resume work in a bailed subtree within one pass
776 +* can reuse work done after being preempted
777 +* can reuse work if shouldComponentUpdate is false, after being preempted
778 +* can update in the middle of a tree using setState
779 +* can queue multiple state updates
780 +* can use updater form of setState
781 +* can call setState inside update callback
782 +* can replaceState
783 +* can forceUpdate
784 +* can call sCU while resuming a partly mounted component
785 +* gets new props when setting state on a partly updated component
786 +* calls componentWillMount twice if the initial render is aborted
787 +* uses state set in componentWillMount even if initial render was aborted
788 +* calls componentWill* twice if an update render is aborted
789 +* does not call componentWillReceiveProps for state-only updates
790 +* skips will/DidUpdate when bailing unless an update was already in progress
791 +
792 +src/renderers/shared/fiber/__tests__/ReactIncrementalReflection-test.js
793 +* handles isMounted even when the initial render is deferred
794 +* handles isMounted when an unmount is deferred
795 +* finds no node before insertion and correct node before deletion
796 +
797 +src/renderers/shared/fiber/__tests__/ReactIncrementalSideEffects-test.js
798 +* can update child nodes of a host instance
799 +* can update child nodes of a fragment
800 +* can update child nodes rendering into text nodes
801 +* can deletes children either components, host or text
802 +* can delete a child that changes type - implicit keys
803 +* can delete a child that changes type - explicit keys
804 +* does not update child nodes if a flush is aborted
805 +* preserves a previously rendered node when deprioritized
806 +* can reuse side-effects after being preempted
807 +* can reuse side-effects after being preempted, if shouldComponentUpdate is false
808 +* updates a child even though the old props is empty
809 +* can defer side-effects and resume them later on
810 +* can defer side-effects and reuse them later - complex
811 +* deprioritizes setStates that happens within a deprioritized tree
812 +* calls callback after update is flushed
813 +* calls componentWillUnmount after a deletion, even if nested
814 +* calls componentDidMount/Update after insertion/update
815 +* invokes ref callbacks after insertion/update/unmount
816 +* supports string refs
817 +
818 +src/renderers/shared/fiber/__tests__/ReactTopLevelFragment-test.js
819 +* should render a simple fragment at the top of a component
820 +* should preserve state when switching from a single child
821 +* should not preserve state when switching to a nested array
822 +* preserves state if an implicit key slot switches from/to null
823 +* should preserve state in a reorder
824 +
825 +src/renderers/shared/fiber/__tests__/ReactTopLevelText-test.js
826 +* should render a component returning strings directly from render
827 +* should render a component returning numbers directly from render
828 +
829 +src/renderers/shared/hooks/__tests__/ReactComponentTreeHook-test.js
830 +* is created during mounting
831 +* is created when calling renderToString during render
832 +
833 +src/renderers/shared/hooks/__tests__/ReactComponentTreeHook-test.native.js
834 +* uses displayName or Unknown for classic components
835 +* uses displayName, name, or ReactComponent for modern components
836 +* uses displayName, name, or Object for factory components
837 +* uses displayName, name, or StatelessComponent for functional components
838 +* reports a host tree correctly
839 +* reports a simple tree with composites correctly
840 +* reports a tree with composites correctly
841 +* ignores null children
842 +* ignores false children
843 +* reports text nodes as children
844 +* reports a single text node as a child
845 +* reports a single number node as a child
846 +* reports a zero as a child
847 +* skips empty nodes for multiple children
848 +* updates text of a single text child
849 +* updates from no children to a single text child
850 +* updates from a single text child to no children
851 +* updates from no children to multiple text children
852 +* updates from multiple text children to no children
853 +* updates from one text child to multiple text children
854 +* updates from multiple text children to one text child
855 +* updates text nodes when reordering
856 +* updates host nodes when reordering with keys
857 +* updates host nodes when reordering with keys
858 +* updates a single composite child of a different type
859 +* updates a single composite child of the same type
860 +* updates from no children to a single composite child
861 +* updates from a single composite child to no children
862 +* updates mixed children
863 +* updates with a host child
864 +* updates from null to a host child
865 +* updates from a host child to null
866 +* updates from a host child to a composite child
867 +* updates from a composite child to a host child
868 +* updates from null to a composite child
869 +* updates from a composite child to null
870 +* updates with a host child
871 +* updates from null to a host child
872 +* updates from a host child to null
873 +* updates from a host child to a composite child
874 +* updates from a composite child to a host child
875 +* updates from null to a composite child
876 +* updates from a composite child to null
877 +* tracks owner correctly
878 +* purges unmounted components automatically
879 +* reports update counts
880 +* does not report top-level wrapper as a root
881 +
882 +src/renderers/shared/hooks/__tests__/ReactHostOperationHistoryHook-test.js
883 +* gets ignored for composite roots that return null
884 +* gets ignored if new text is equal
885 +* gets ignored if new text is equal
886 +* gets ignored if the type has not changed
887 +* gets ignored if new html is equal
888 +
889 +src/renderers/shared/shared/__tests__/ReactTreeTraversal-test.js
890 +* should not traverse when traversing outside DOM
891 +* should not traverse when enter/leaving outside DOM
892 +* should not traverse if enter/leave the same node
893 +* should determine the first common ancestor correctly
894 +
895 +src/renderers/shared/shared/event/__tests__/EventPluginHub-test.js
896 +* should prevent non-function listeners
897 +
898 +src/renderers/shared/shared/event/__tests__/EventPluginRegistry-test.js
899 +* should be able to inject ordering before plugins
900 +* should be able to inject plugins before and after ordering
901 +* should be able to inject repeated plugins and out-of-order
902 +* should throw if plugin does not implement `extractEvents`
903 +* should throw if plugin does not exist in ordering
904 +* should throw if ordering is injected more than once
905 +* should throw if different plugins injected using same name
906 +* should publish registration names of injected plugins
907 +* should throw if multiple registration names collide
908 +* should throw if an invalid event is published
909 +* should be able to get the plugin from synthetic events
910 +
911 +src/renderers/shared/shared/event/eventPlugins/__tests__/ResponderEventPlugin-test.js
912 +* should do nothing when no one wants to respond
913 +* should grant responder grandParent while capturing
914 +* should grant responder parent while capturing
915 +* should grant responder child while capturing
916 +* should grant responder child while bubbling
917 +* should grant responder parent while bubbling
918 +* should grant responder grandParent while bubbling
919 +* should grant responder grandParent while capturing move
920 +* should grant responder parent while capturing move
921 +* should grant responder child while capturing move
922 +* should grant responder child while bubbling move
923 +* should grant responder parent while bubbling move
924 +* should grant responder grandParent while bubbling move
925 +* should bubble negotiation to first common ancestor of responder
926 +* should bubble negotiation to first common ancestor of responder then transfer
927 +* should negotiate with deepest target on second touch if nothing is responder
928 +* should negotiate until first common ancestor when there are siblings
929 +* should notify of being rejected. responderStart/Move happens on current responder
930 +* should negotiate scroll
931 +* should cancel correctly
932 +
933 +src/renderers/shared/stack/reconciler/__tests__/ReactComponent-test.js
934 +* should warn when children are mutated during render
935 +* should warn when children are mutated during update
936 +* should support refs on owned components
937 +* should not have refs on unmounted components
938 +* should support new-style refs
939 +* should support new-style refs with mixed-up owners
940 +* should call refs at the correct time
941 +* fires the callback after a component is rendered
942 +
943 +src/renderers/shared/stack/reconciler/__tests__/ReactComponentLifeCycle-test.js
944 +* should not reuse an instance when it has been unmounted
945 +* it should fire onDOMReady when already in onDOMReady
946 +* throws when accessing state in componentWillMount
947 +* should allow update state inside of componentWillMount
948 +* should not allow update state inside of getInitialState
949 +* isMounted should return false when unmounted
950 +* should not throw when updating an auxiliary component
951 +* should allow state updates in componentDidMount
952 +* should call nested lifecycle methods in the right order
953 +
954 +src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponent-test.js
955 +* should support module pattern components
956 +* should support rendering to different child types over time
957 +* should rewire refs when rendering to different child types
958 +* should not cache old DOM nodes when switching constructors
959 +* should auto bind methods and values correctly
960 +* should not pass this to getDefaultProps
961 +* should use default values for undefined props
962 +* should not mutate passed-in props object
963 +* should silently allow `setState`, not call cb on unmounting components
964 +* should cleanup even if render() fatals
965 +* should call componentWillUnmount before unmounting
966 +* should skip update when rerendering element in container
967 +* only renders once if updated in componentWillReceiveProps
968 +* should allow access to findDOMNode in componentWillUnmount
969 +* context should be passed down from the parent
970 +* should replace state
971 +* should not warn about unmounting during unmounting
972 +* should only call componentWillUnmount once
973 +
974 +src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponentDOMMinimalism-test.js
975 +* should not render extra nodes for non-interpolated text
976 +* should not render extra nodes for non-interpolated text
977 +* should not render extra nodes for non-interpolated text
978 +
979 +src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponentState-test.js
980 +* should batch unmounts
981 +
982 +src/renderers/shared/stack/reconciler/__tests__/ReactEmptyComponent-test.js
983 +* should not produce child DOM nodes for null and false
984 +* should have findDOMNode return null when multiple layers of composite components render to the same null placeholder
985 +* works when switching components
986 +* does not break when updating during mount
987 +
988 +src/renderers/shared/stack/reconciler/__tests__/ReactErrorBoundaries-test.js
989 +* does not swallow exceptions on mounting without boundaries
990 +* does not swallow exceptions on updating without boundaries
991 +* does not swallow exceptions on unmounting without boundaries
992 +* prevents errors from leaking into other roots
993 +* renders an error state if child throws in render
994 +* renders an error state if child throws in constructor
995 +* renders an error state if child throws in componentWillMount
996 +* mounts the error message if mounting fails
997 +* propagates errors on retry on mounting
998 +* propagates errors inside boundary during componentWillMount
999 +* propagates errors inside boundary while rendering error state
1000 +* does not register event handlers for unmounted children
1001 +* does not call componentWillUnmount when aborting initial mount
1002 +* resets refs if mounting aborts
1003 +* successfully mounts if no error occurs
1004 +* catches if child throws in constructor during update
1005 +* catches if child throws in componentWillMount during update
1006 +* catches if child throws in componentWillReceiveProps during update
1007 +* catches if child throws in componentWillUpdate during update
1008 +* catches if child throws in render during update
1009 +* keeps refs up-to-date during updates
1010 +* recovers from componentWillUnmount errors on update
1011 +* recovers from nested componentWillUnmount errors on update
1012 +* picks the right boundary when handling unmounting errors
1013 +* can recover from error state
1014 +* can update multiple times in error state
1015 +* doesn't get into inconsistent state during removals
1016 +* doesn't get into inconsistent state during additions
1017 +* doesn't get into inconsistent state during reorders
1018 +* catches errors originating downstream
1019 +* catches errors in componentDidMount
1020 +* catches errors in componentDidUpdate
1021 +* propagates errors inside boundary during componentDidMount
1022 +* lets different boundaries catch their own first errors
1023 +
1024 +src/renderers/shared/stack/reconciler/__tests__/ReactIdentity-test.js
1025 +* should allow key property to express identity
1026 +* should use composite identity
1027 +* should allow any character as a key, in a detached parent
1028 +* should allow any character as a key, in an attached parent
1029 +* should not allow scripts in keys to execute
1030 +* should let restructured components retain their uniqueness
1031 +* should let nested restructures retain their uniqueness
1032 +* should let text nodes retain their uniqueness
1033 +* should retain key during updates in composite components
1034 +* should not allow implicit and explicit keys to collide
1035 +
1036 +src/renderers/shared/stack/reconciler/__tests__/ReactMockedComponent-test.js
1037 +* should allow an implicitly mocked component to be rendered without warnings
1038 +* should allow an implicitly mocked component to be updated
1039 +* has custom methods on the implicitly mocked component
1040 +* should allow an explicitly mocked component to be rendered
1041 +* should allow an explicitly mocked component to be updated
1042 +* has custom methods on the explicitly mocked component
1043 +
1044 +src/renderers/shared/stack/reconciler/__tests__/ReactMultiChild-test.js
1045 +* should update children when possible
1046 +* should replace children with different constructors
1047 +* should NOT replace children with different owners
1048 +* should replace children with different keys
1049 +
1050 +src/renderers/shared/stack/reconciler/__tests__/ReactMultiChildReconcile-test.js
1051 +* should reset internal state if removed then readded
1052 +* should create unique identity
1053 +* should preserve order if children order has not changed
1054 +* should transition from zero to one children correctly
1055 +* should transition from one to zero children correctly
1056 +* should transition from one child to null children
1057 +* should transition from null children to one child
1058 +* should transition from zero children to null children
1059 +* should transition from null children to zero children
1060 +* should remove nulled out children at the beginning
1061 +* should remove nulled out children at the end
1062 +* should reverse the order of two children
1063 +* should reverse the order of more than two children
1064 +* should cycle order correctly
1065 +* should cycle order correctly in the other direction
1066 +* should remove nulled out children and ignore new null children
1067 +* should remove nulled out children and reorder remaining
1068 +* should append children to the end
1069 +* should append multiple children to the end
1070 +* should prepend children to the beginning
1071 +* should prepend multiple children to the beginning
1072 +* should not prepend an empty child to the beginning
1073 +* should not append an empty child to the end
1074 +* should not insert empty children in the middle
1075 +* should insert one new child in the middle
1076 +* should insert multiple new truthy children in the middle
1077 +
1078 +src/renderers/shared/stack/reconciler/__tests__/ReactMultiChildText-test.js
1079 +* should render between nested components and inline children
1080 +
1081 +src/renderers/shared/stack/reconciler/__tests__/ReactStateSetters-test.js
1082 +* createStateSetter should update state
1083 +* createStateKeySetter should update state
1084 +* createStateKeySetter is memoized
1085 +* createStateSetter should update state from mixin
1086 +* createStateKeySetter should update state with mixin
1087 +* createStateKeySetter is memoized with mixin
1088 +
1089 +src/renderers/shared/stack/reconciler/__tests__/ReactStatelessComponent-test.js
1090 +* should render stateless component
1091 +* should update stateless component
1092 +* should unmount stateless component
1093 +* should provide a null ref
1094 +* should use correct name in key warning
1095 +* should support default props and prop types
1096 +* should work with arrow functions
1097 +* should allow simple functions to return null
1098 +* should allow simple functions to return false
1099 +
1100 +src/renderers/shared/stack/reconciler/__tests__/ReactUpdates-test.js
1101 +* should not reconcile children passed via props
1102 +* should queue nested updates
1103 +* calls componentWillReceiveProps setState callback properly
1104 +* does not update one component twice in a batch (#6371)
1105 +
1106 +src/renderers/shared/stack/reconciler/__tests__/Transaction-test.js
1107 +* should invoke closers with/only-with init returns
1108 +* should invoke closers and wrapped method when inits success
1109 +* should throw when wrapped operation throws
1110 +* should throw errors in transaction close
1111 +* should allow nesting of transactions
1112 +
1113 +src/renderers/shared/stack/reconciler/__tests__/refs-destruction-test.js
1114 +* should remove refs when destroying the parent
1115 +* should remove refs when destroying the child
1116 +* should not error when destroying child with ref asynchronously
1117 +
1118 +src/renderers/shared/stack/reconciler/__tests__/refs-test.js
1119 +* Allow refs to hop around children correctly
1120 +* always has a value for this.refs
1121 +* ref called correctly for stateless component when __DEV__ = false
1122 +* ref called correctly for stateless component when __DEV__ = true
1123 +
1124 +src/renderers/shared/utils/__tests__/accumulateInto-test.js
1125 +* throws if the second item is null
1126 +* returns the second item if first is null
1127 +* merges the second into the first if first item is an array
1128 +* returns a new array if first or both items are scalar
1129 +
1130 +src/renderers/shared/utils/__tests__/adler32-test.js
1131 +* generates differing checksums
1132 +* generates consistent checksums
1133 +* is case sensitive
1134 +* doesn't barf on large inputs
1135 +* doesn't barf on international inputs
1136 +
1137 +src/renderers/testing/__tests__/ReactTestRenderer-test.js
1138 +* renders a simple component
1139 +* renders a top-level empty component
1140 +* exposes a type flag
1141 +* renders some basics with an update
1142 +* exposes the instance
1143 +* updates types
1144 +* updates children
1145 +* does the full lifecycle
1146 +* gives a ref to native components
1147 +* warns correctly for refs on SFCs
1148 +* allows an optional createNodeMock function
1149 +* supports error boundaries
1150 +
1151 +src/shared/utils/__tests__/KeyEscapeUtils-test.js
1152 +* should properly escape and wrap user defined keys
1153 +* should properly unescape and unwrap user defined keys
1154 +
1155 +src/shared/utils/__tests__/PooledClass-test.js
1156 +* should initialize a pool correctly
1157 +* should return a new instance when the pool is empty
1158 +* should return the instance back into the pool when it gets released
1159 +* should return an old instance if available in the pool
1160 +* should call the destructor when instance gets released
1161 +* should accept poolers with different arguments
1162 +* should call a new constructor with arguments
1163 +* should call an old constructor with arguments
1164 +* should throw when the class releases an instance of a different type
1165 +* should throw if no destructor is defined
1166 +
1167 +src/shared/utils/__tests__/reactProdInvariant-test.js
1168 +* should throw with the correct number of `%s`s in the URL
1169 +
1170 +src/shared/utils/__tests__/traverseAllChildren-test.js
1171 +* should support identity for simple
1172 +* should treat single arrayless child as being in array
1173 +* should treat single child in array as expected
1174 +* should be called for each child
1175 +* should traverse children of different kinds
1176 +* should be called for each child in nested structure
1177 +* should retain key across two mappings
1178 +* should be called for each child in an iterable without keys
1179 +* should be called for each child in an iterable with keys
1180 +* should use keys from entry iterables
1181 +* should not enumerate enumerable numbers (#4776)
1182 +* should allow extension of native prototypes
1183 +* should throw on object
1184 +* should throw on regex
1185 +
1186 +src/test/__tests__/ReactTestUtils-test.js
1187 +* should have shallow rendering
1188 +* should shallow render a functional component
1189 +* should throw for invalid elements
1190 +* should have shallow unmounting
1191 +* can shallow render to null
1192 +* can shallow render with a ref
1193 +* lets you update shallowly rendered components
1194 +* can access the mounted component instance
1195 +* can shallowly render components with contextTypes
1196 +* can shallowly render components with ref as function
1197 +* can setState in componentWillMount when shallow rendering
1198 +* can pass context when shallowly rendering
1199 +* can fail context when shallowly rendering
1200 +* can scryRenderedDOMComponentsWithClass with TextComponent
1201 +* can scryRenderedDOMComponentsWithClass with className contains \n
1202 +* can scryRenderedDOMComponentsWithClass with multiple classes
1203 +* should throw when attempting to use ReactTestUtils.Simulate with shallow rendering
1204 +* should not warn when simulating events with extra properties
scripts/jest/test-framework-setup.js
+6
@@ -3,6 +3,12 @@
3 // We want to globally mock this but jest doesn't let us do that by default
4 // for a file that already exists. So we have to explicitly mock it.
5 jest.mock('ReactDOM');
6 +jest.mock('ReactDOMFeatureFlags', () => {
7 + const flags = require.requireActual('ReactDOMFeatureFlags');
8 + return Object.assign({}, flags, {
9 + useFiber: flags.useFiber || !!process.env.REACT_DOM_JEST_USE_FIBER,
10 + });
11 +});
12
13 var env = jasmine.getEnv();
14
src/renderers/shared/shared/__tests__/ReactTreeTraversal-test.js
+32 -32
@@ -24,9 +24,9 @@ var ARG2 = {arg2: true};
24 class ChildComponent extends React.Component {
25 render() {
26 return (
27 - <div ref="DIV">
28 - <div ref="DIV_1" />
29 - <div ref="DIV_2" />
27 + <div ref="DIV" id={this.props.id + '__DIV'}>
28 + <div ref="DIV_1" id={this.props.id + '__DIV_1'} />
29 + <div ref="DIV_2" id={this.props.id + '__DIV_2'} />
30 </div>
31 );
32 }
@@ -35,12 +35,12 @@ class ChildComponent extends React.Component {
35 class ParentComponent extends React.Component {
36 render() {
37 return (
38 - <div ref="P">
39 - <div ref="P_P1">
40 - <ChildComponent ref="P_P1_C1" />
41 - <ChildComponent ref="P_P1_C2" />
38 + <div ref="P" id="P">
39 + <div ref="P_P1" id="P_P1">
40 + <ChildComponent ref="P_P1_C1" id="P_P1_C1" />
41 + <ChildComponent ref="P_P1_C2" id="P_P1_C2" />
42 </div>
43 - <div ref="P_OneOff" />
43 + <div ref="P_OneOff" id="P_OneOff" />
44 </div>
45 );
46 }
@@ -56,7 +56,7 @@ describe('ReactTreeTraversal', () => {
56 var aggregatedArgs;
57 function argAggregator(inst, phase, arg) {
58 aggregatedArgs.push({
59 - node: ReactDOMComponentTree.getNodeFromInstance(inst),
59 + node: ReactDOMComponentTree.getNodeFromInstance(inst).id,
60 phase: phase,
61 arg: arg,
62 });
@@ -82,15 +82,15 @@ describe('ReactTreeTraversal', () => {
82 var parent = renderParentIntoDocument();
83 var target = getInst(parent.refs.P_P1_C1.refs.DIV_1);
84 var expectedAggregation = [
85 - {node: parent.refs.P, phase: 'captured', arg: ARG},
86 - {node: parent.refs.P_P1, phase: 'captured', arg: ARG},
87 - {node: parent.refs.P_P1_C1.refs.DIV, phase: 'captured', arg: ARG},
88 - {node: parent.refs.P_P1_C1.refs.DIV_1, phase: 'captured', arg: ARG},
85 + {node: 'P', phase: 'captured', arg: ARG},
86 + {node: 'P_P1', phase: 'captured', arg: ARG},
87 + {node: 'P_P1_C1__DIV', phase: 'captured', arg: ARG},
88 + {node: 'P_P1_C1__DIV_1', phase: 'captured', arg: ARG},
89
90 - {node: parent.refs.P_P1_C1.refs.DIV_1, phase: 'bubbled', arg: ARG},
91 - {node: parent.refs.P_P1_C1.refs.DIV, phase: 'bubbled', arg: ARG},
92 - {node: parent.refs.P_P1, phase: 'bubbled', arg: ARG},
93 - {node: parent.refs.P, phase: 'bubbled', arg: ARG},
90 + {node: 'P_P1_C1__DIV_1', phase: 'bubbled', arg: ARG},
91 + {node: 'P_P1_C1__DIV', phase: 'bubbled', arg: ARG},
92 + {node: 'P_P1', phase: 'bubbled', arg: ARG},
93 + {node: 'P', phase: 'bubbled', arg: ARG},
94 ];
95 ReactTreeTraversal.traverseTwoPhase(target, argAggregator, ARG);
96 expect(aggregatedArgs).toEqual(expectedAggregation);
@@ -100,8 +100,8 @@ describe('ReactTreeTraversal', () => {
100 var parent = renderParentIntoDocument();
101 var target = getInst(parent.refs.P);
102 var expectedAggregation = [
103 - {node: parent.refs.P, phase: 'captured', arg: ARG},
104 - {node: parent.refs.P, phase: 'bubbled', arg: ARG},
103 + {node: 'P', phase: 'captured', arg: ARG},
104 + {node: 'P', phase: 'bubbled', arg: ARG},
105 ];
106 ReactTreeTraversal.traverseTwoPhase(target, argAggregator, ARG);
107 expect(aggregatedArgs).toEqual(expectedAggregation);
@@ -134,9 +134,9 @@ describe('ReactTreeTraversal', () => {
134 var leave = getInst(parent.refs.P_P1_C1.refs.DIV_1);
135 var enter = getInst(parent.refs.P_P1_C1.refs.DIV_2);
136 var expectedAggregation = [
137 - {node: parent.refs.P_P1_C1.refs.DIV_1, phase: 'bubbled', arg: ARG},
137 + {node: 'P_P1_C1__DIV_1', phase: 'bubbled', arg: ARG},
138 // enter/leave shouldn't fire anything on the parent
139 - {node: parent.refs.P_P1_C1.refs.DIV_2, phase: 'captured', arg: ARG2},
139 + {node: 'P_P1_C1__DIV_2', phase: 'captured', arg: ARG2},
140 ];
141 ReactTreeTraversal.traverseEnterLeave(
142 leave, enter, argAggregator, ARG, ARG2
@@ -149,7 +149,7 @@ describe('ReactTreeTraversal', () => {
149 var leave = getInst(parent.refs.P_P1_C1.refs.DIV_1);
150 var enter = getInst(parent.refs.P_P1_C1.refs.DIV);
151 var expectedAggregation = [
152 - {node: parent.refs.P_P1_C1.refs.DIV_1, phase: 'bubbled', arg: ARG},
152 + {node: 'P_P1_C1__DIV_1', phase: 'bubbled', arg: ARG},
153 ];
154 ReactTreeTraversal.traverseEnterLeave(
155 leave, enter, argAggregator, ARG, ARG2
@@ -162,9 +162,9 @@ describe('ReactTreeTraversal', () => {
162 var leave = null; // From the window or outside of the React sandbox.
163 var enter = getInst(parent.refs.P_P1_C1.refs.DIV);
164 var expectedAggregation = [
165 - {node: parent.refs.P, phase: 'captured', arg: ARG2},
166 - {node: parent.refs.P_P1, phase: 'captured', arg: ARG2},
167 - {node: parent.refs.P_P1_C1.refs.DIV, phase: 'captured', arg: ARG2},
165 + {node: 'P', phase: 'captured', arg: ARG2},
166 + {node: 'P_P1', phase: 'captured', arg: ARG2},
167 + {node: 'P_P1_C1__DIV', phase: 'captured', arg: ARG2},
168 ];
169 ReactTreeTraversal.traverseEnterLeave(
170 leave, enter, argAggregator, ARG, ARG2
@@ -177,7 +177,7 @@ describe('ReactTreeTraversal', () => {
177 var leave = null; // From the window or outside of the React sandbox.
178 var enter = getInst(parent.refs.P);
179 var expectedAggregation = [
180 - {node: parent.refs.P, phase: 'captured', arg: ARG2},
180 + {node: 'P', phase: 'captured', arg: ARG2},
181 ];
182 ReactTreeTraversal.traverseEnterLeave(
183 leave, enter, argAggregator, ARG, ARG2
@@ -190,9 +190,9 @@ describe('ReactTreeTraversal', () => {
190 var enter = null; // From the window or outside of the React sandbox.
191 var leave = getInst(parent.refs.P_P1_C1.refs.DIV);
192 var expectedAggregation = [
193 - {node: parent.refs.P_P1_C1.refs.DIV, phase: 'bubbled', arg: ARG},
194 - {node: parent.refs.P_P1, phase: 'bubbled', arg: ARG},
195 - {node: parent.refs.P, phase: 'bubbled', arg: ARG},
193 + {node: 'P_P1_C1__DIV', phase: 'bubbled', arg: ARG},
194 + {node: 'P_P1', phase: 'bubbled', arg: ARG},
195 + {node: 'P', phase: 'bubbled', arg: ARG},
196 ];
197 ReactTreeTraversal.traverseEnterLeave(
198 leave, enter, argAggregator, ARG, ARG2
@@ -205,9 +205,9 @@ describe('ReactTreeTraversal', () => {
205 var enter = null; // From the window or outside of the React sandbox.
206 var leave = getInst(parent.refs.P_P1_C1.refs.DIV);
207 var expectedAggregation = [
208 - {node: parent.refs.P_P1_C1.refs.DIV, phase: 'bubbled', arg: ARG},
209 - {node: parent.refs.P_P1, phase: 'bubbled', arg: ARG},
210 - {node: parent.refs.P, phase: 'bubbled', arg: ARG},
208 + {node: 'P_P1_C1__DIV', phase: 'bubbled', arg: ARG},
209 + {node: 'P_P1', phase: 'bubbled', arg: ARG},
210 + {node: 'P', phase: 'bubbled', arg: ARG},
211 ];
212 ReactTreeTraversal.traverseEnterLeave(
213 leave, enter, argAggregator, ARG, ARG2