react/scripts
Andrew Clark 268a3f60df
Add unstable APIs for async rendering to test renderer (#12478)
These are based on the ReactNoop renderer, which we use to test React
itself. This gives library authors (Relay, Apollo, Redux, et al.) a way
to test their components for async compatibility.

- Pass `unstable_isAsync` to `TestRenderer.create` to create an async
renderer instance. This causes updates to be lazily flushed.
- `renderer.unstable_yield` tells React to yield execution after the
currently rendering component.
- `renderer.unstable_flushAll` flushes all pending async work, and
returns an array of yielded values.
- `renderer.unstable_flushThrough` receives an array of expected values,
begins rendering, and stops once those values have been yielded. It
returns the array of values that are actually yielded. The user should
assert that they are equal.

Although we've used this pattern successfully in our own tests, I'm not
sure if these are the final APIs we'll make public.
2018-03-28 14:57:25 -07:00
..
babel Minor typos fixed (#12005) 2018-01-11 12:24:49 +00:00
bench Minor typos fixed (#12005) 2018-01-11 12:24:49 +00:00
circleci Clean shell scripts (#12365) 2018-03-21 12:03:09 -04:00
error-codes Update error codes for 16.3.0-alpha.2 release 2018-03-14 13:26:40 -07:00
eslint use different eslint config for es6 and es5 (#11794) 2017-12-11 15:52:46 +00:00
eslint-rules Upgrade to ESLint 4.1 and add no-focused-tests rule (#11977) 2018-01-09 10:55:51 -08:00
facts-tracker use different eslint config for es6 and es5 (#11794) 2017-12-11 15:52:46 +00:00
flow Add Experimental Fabric Renderer (#12069) 2018-01-22 09:58:35 -08:00
git Remove leftover env variable logic in pre-commit hook 2015-09-01 14:35:47 -07:00
jest Workaround jest-diff single line string limitation (#12456) 2018-03-26 10:48:36 -07:00
perf-counters Change license and remove references to PATENTS 2017-09-25 18:17:44 -07:00
prettier Use Prettier Config API (#11980) 2018-01-07 11:51:59 +00:00
print-warnings Update prettier to 1.8.1 (#10785) 2017-11-07 18:09:33 +00:00
release Fix build script to handle react-is (no peer deps) (#12471) 2018-03-27 19:19:34 -07:00
rollup Add unstable APIs for async rendering to test renderer (#12478) 2018-03-28 14:57:25 -07:00
shared use different eslint config for es6 and es5 (#11794) 2017-12-11 15:52:46 +00:00
tasks Replace danger token with a refreshed facebook-open-source-bot token (#12295) 2018-02-26 16:20:54 -08:00
authors AUTHORS 2013-09-09 23:42:54 -07:00