react/scripts/rollup
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
..
plugins Drop the year from Facebook copyright headers and the LICENSE file. (#13593) 2018-09-07 15:11:23 -07:00
shims Enable hooks by default for FB React Native renderer (#14435) 2018-12-13 13:20:23 -08:00
validate [React Native] Inline calls to FabricUIManager in shared code (#15490) 2019-04-29 14:31:16 -07:00
build.js add --watch mode to "yarn build" (#15116) 2019-04-25 12:55:44 +01:00
bundles.js act() - s / flushPassiveEffects / Scheduler.unstable_flushWithoutYielding (#15591) 2019-05-16 17:12:36 +01:00
forks.js Fork ReactSharedInternals for UMD builds (#15617) 2019-05-10 13:51:39 -07:00
modules.js Swap expect(ReactNoop) for expect(Scheduler) (#14971) 2019-02-28 12:54:47 -08:00
packaging.js Add UMD production+profiling entry points (#13642) 2018-09-13 17:44:08 -07:00
stats.js Don't run danger on bad build (#14143) 2018-11-09 10:21:39 -08:00
sync.js Fork React Native renderer into FB and OSS bundles (#12625) 2018-04-18 13:16:50 -07:00
utils.js Refactor the build scripts (#11787) 2017-12-06 20:11:32 +00:00
wrappers.js Add UMD production+profiling entry points (#13642) 2018-09-13 17:44:08 -07:00