react/packages/scheduler
Sunil Pai d278a3ff8b
act() - s / flushPassiveEffects / Scheduler.unstable_flushWithoutYielding (#15591)
* s/flushPassiveEffects/unstable_flushWithoutYielding

a first crack at flushing the scheduler manually from inside act(). uses unstable_flushWithoutYielding(). The tests that changed, mostly replaced toFlushAndYield(...) with toHaveYielded(). For some tests that tested the state of the tree before flushing effects (but still after updates), I replaced act() with bacthedUpdates().

* ugh lint

* pass build, flushPassiveEffects returns nothing now

* pass test-fire

* flush all work (not just effects), add a compatibility mode

of note, unstable_flushWithoutYielding now returns a boolean much like flushPassiveEffects

* umd build for scheduler/unstable_mock, pass the fixture with it

* add a comment to Shcduler.umd.js for why we're exporting unstable_flushWithoutYielding

* run testsutilsact tests in both sync/concurrent modes

* augh lint

* use a feature flag for the missing mock scheduler warning

I also tried writing a test for it, but couldn't get the scheduler to unmock. included the failing test.

* Update ReactTestUtilsAct-test.js

- pass the mock scheduler warning test,
- rewrite some tests to use Scheduler.yieldValue
- structure concurrent/legacy suites neatly

* pass failing tests in batchedmode-test

* fix pretty/lint/import errors

* pass test-build

* nit: pull .create(null) out of the act() call
2019-05-16 17:12:36 +01:00
..
npm Add method for forcing a lower framerate 2019-04-29 15:51:58 -07:00
src act() - s / flushPassiveEffects / Scheduler.unstable_flushWithoutYielding (#15591) 2019-05-16 17:12:36 +01:00
index.js Rename schedule to scheduler (#13683) 2018-09-19 01:26:28 +01:00
package.json Bump scheduler version to 0.14.0 (#15395) 2019-04-29 18:10:11 -07:00
README.md Rename schedule to scheduler (#13683) 2018-09-19 01:26:28 +01:00
tracing.js Rename schedule to scheduler (#13683) 2018-09-19 01:26:28 +01:00
unstable_mock.js Add new mock build of Scheduler with flush, yield API (#14964) 2019-02-26 20:51:17 -08:00

scheduler

This is a package for cooperative scheduling in a browser environment. It is currently used internally by React, but we plan to make it more generic.

The public API for this package is not yet finalized.

Thanks

The React team thanks Anton Podviaznikov for donating the scheduler package name.