Commit Graph

263 Commits

Author SHA1 Message Date
Brian Vaughn 53ab1948b5
Blacklist spyOn(). Add explicit spyOnProd() and spyOnDevAndProd() (#11691)
* Blacklist spyOn(). Add explicit spyOnProd() and spyOnDevAndProd()

* Wording tweak.

* Fixed lint no-shadow warning
2017-11-28 14:06:26 -08:00
Clement Hoang 5a42586178 Updating package versions for release 16.2.0 2017-11-28 13:26:36 -08:00
Dominic Gannaway 363f4f14dc [WIP] Fix for fiber root scheduling memory leak (#11644)
* Fix for root memory leak

* forgot to add code
2017-11-28 12:57:32 -08:00
rivenhk 8e876d244c Move ReactFiberTreeReflection to react-reconciler/reflection (#11683)
* Move ReactFiberTreeReflection to react-reconciler/reflection #11659

* Use * for react-reconciler

We don't know the latest local version, and release script currently doesn't bump deps automatically.

* Remove unused field

* Use CommonJS in entry point for consistency

* Undo the CommonJS change

I didn't realize it would break the build.

* Record sizes

* Remove reconciler fixtures

They're unnecessary now that we run real tests on reconciler bundles.
2017-11-28 16:57:22 +00:00
Ronald Eddy Jr b542f42a0f Update README URLS to HTTPS (#11635)
URLs were updated to use HTTPS protocol in README files.
2017-11-27 18:13:41 -08:00
Dan Abramov 878feebe34
Remove accidentally duplicated tests (#11675)
* Remove accidentally duplicated tests

* Refactor: move unmock() call into the only test needing it

This makes the intent more explicit.
2017-11-27 22:38:50 +00:00
Dan Abramov fe551de273
Enable bundle tests for React.Fragment (#11673) 2017-11-27 21:44:13 +00:00
Clement Hoang f6894dc48b
Set fragment export flags to true (#11672) 2017-11-27 13:09:15 -08:00
Anton Arboleda d1cb28c86b Refactor SyntheticKeyboardEvent tests to only use the public API (#11631)
* KeyboardEvent interface-keypress

* Pass first 6 tests

* Roll getEventCharCode-test into SyntheticKeyboardEvent-test

* Run SyntheticKeyboardEvent-test on bundles

* Remove unused code
2017-11-25 15:47:05 +00:00
Dan Abramov f0ba6bbf20
Replace inputValueTracking-test with public API tests (#11654) 2017-11-25 01:47:10 +00:00
Ethan Arrowood a67757e115 Use only public API for ChangeEventPlugin-test.js (#11333)
* Use only public API for ChangeEventPlugin-test.js

* precommit commands complete

* Removed comments

* Improving event dispatchers

* Updated tests

* Fixed for revisions

* Prettified

* Add more details and fixes to tests

* Not internal anymore

* Remove unused code
2017-11-24 22:18:40 +00:00
Zubair Ahmed 7d27851bf4 Issue#11510: added verification check for misspelled propTypes (#11524)
* added verification check for misspelled propTypes

* added flag to check if misspelled warning was shown to developer before

* added the condition to else if and improved the warning message

* moved  variable under dev section & initialized it to false

* added test to confirm the missmatch prop type warning in both  and  tests files

* removed eslint disable and split error into 2 lines

* changed expectDev to expect in tests

* added __DEV__ condition before both tests
2017-11-24 02:59:46 +00:00
Dan Abramov 46dd197ceb
Add a note about private API dependency for a test 2017-11-24 01:11:24 +00:00
Jeremias Menichelli cafe352c1a Drop .textContent IE8 polyfill and rewrite escaping tests against public API (#11331)
* Rename escapeText util. Test quoteAttributeValueForBrowser through ReactDOMServer API

* Fix lint errors

* Prettier reformatting

* Change syntax to prevent prettier escape doble quote

* Name and description gardening. Add tests for escapeTextForBrowser. Add missing tests

* Improve script tag as text content test

* Update escapeTextForBrowser-test.js

* Update quoteAttributeValueForBrowser-test.js

* Simplify tests

* Move utilities to server folder
2017-11-23 22:41:28 +00:00
Dan Abramov fa7a97fc46
Run 90% of tests on compiled bundles (both development and production) (#11633)
* Extract Jest config into a separate file

* Refactor Jest scripts directory structure

Introduces a more consistent naming scheme.

* Add yarn test-bundles and yarn test-prod-bundles

Only files ending with -test.public.js are opted in (so far we don't have any).

* Fix error decoding for production bundles

GCC seems to remove `new` from `new Error()` which broke our proxy.

* Build production version of react-noop-renderer

This lets us test more bundles.

* Switch to blacklist (exclude .private.js tests)

* Rename tests that are currently broken against bundles to *-test.internal.js

Some of these are using private APIs. Some have other issues.

* Add bundle tests to CI

* Split private and public ReactJSXElementValidator tests

* Remove internal deps from ReactServerRendering-test and make it public

* Only run tests directly in __tests__

This lets us share code between test files by placing them in __tests__/utils.

* Remove ExecutionEnvironment dependency from DOMServerIntegrationTest

It's not necessary since Stack.

* Split up ReactDOMServerIntegration into test suite and utilities

This enables us to further split it down. Good both for parallelization and extracting public parts.

* Split Fragment tests from other DOMServerIntegration tests

This enables them to opt other DOMServerIntegration tests into bundle testing.

* Split ReactDOMServerIntegration into different test files

It was way too slow to run all these in sequence.

* Don't reset the cache twice in DOMServerIntegration tests

We used to do this to simulate testing separate bundles.
But now we actually *do* test bundles. So there is no need for this, as it makes tests slower.

* Rename test-bundles* commands to test-build*

Also add test-prod-build as alias for test-build-prod because I keep messing them up.

* Use regenerator polyfill for react-noop

This fixes other issues and finally lets us run ReactNoop tests against a prod bundle.

* Run most Incremental tests against bundles

Now that GCC generator issue is fixed, we can do this.
I split ErrorLogging test separately because it does mocking. Other error handling tests don't need it.

* Update sizes

* Fix ReactMount test

* Enable ReactDOMComponent test

* Fix a warning issue uncovered by flat bundle testing

With flat bundles, we couldn't produce a good warning for <div onclick={}> on SSR
because it doesn't use the event system. However the issue was not visible in normal
Jest runs because the event plugins have been injected by the time the test ran.

To solve this, I am explicitly passing whether event system is available as an argument
to the hook. This makes the behavior consistent between source and bundle tests. Then
I change the tests to document the actual logic and _attempt_ to show a nice message
(e.g. we know for sure `onclick` is a bad event but we don't know the right name for it
on the server so we just say a generic message about camelCase naming convention).
2017-11-23 17:44:58 +00:00
Dan Abramov e949d57508
Remove global mocks by adding support for "suppressReactErrorLogging" property (#11636)
* Remove global mocks

They are making it harder to test compiled bundles.

One of them (FeatureFlags) is not used. It is mocked in some specific test files (and that's fine).

The other (FiberErrorLogger) is mocked to silence its output. I'll look if there's some other way to achieve this.

* Add error.suppressReactErrorLogging and use it in tests

This adds an escape hatch to *not* log errors that go through React to the console.
We will enable it for our own tests.
2017-11-23 01:15:22 +00:00
Alex Cordeiro f114bad09f Bug fix - SetState callback called before component state is updated in ReactShallowRenderer (#11507)
* Create test to verify ReactShallowRenderer bug (#11496)

* Fix ReactShallowRenderer callback bug on componentWillMount (#11496)

* Improve fnction naming and clean up queued callback before call

* Run prettier on ReactShallowRenderer.js

* Consolidate callback call on ReactShallowRenderer.js

* Ensure callback behavior is similar between ReactDOM and ReactShallowRenderer

* Fix Code Review requests (#11507)

* Move test to ReactCompositeComponent

* Verify the callback gets called

* Ensure multiple callbacks are correctly handled on ReactShallowRenderer

* Ensure the setState callback is called inside componentWillMount (ReactDOM)

* Clear ReactShallowRenderer callback queue before actually calling the callbacks

* Add test for multiple callbacks on ReactShallowRenderer

* Ensure the ReactShallowRenderer callback queue is cleared after invoking callbacks

* Remove references to internal fields on ReactShallowRenderer test
2017-11-22 22:15:11 +00:00
Dan Abramov 913a125ad5
Change DEV-only invariants to be warnings (#11630)
* Change DEV-only invariant about instance.state type to a warning

* Change DEV-only invariant childContextTypes check to a warning
2017-11-22 18:58:53 +00:00
Dan Abramov 1cb6199d22
Consolidate all symbols in a single file (#11629)
* Consolidate all symbols in a single file

This reduces the code duplication as we have quite a few now.

* Record sizes
2017-11-22 18:08:22 +00:00
Dan Abramov 6041f481b7
Run Jest in production mode (#11616)
* Move Jest setup files to /dev/ subdirectory

* Clone Jest /dev/ files into /prod/

* Move shared code into scripts/jest

* Move Jest config into the scripts folder

* Fix the equivalence test

It fails because the config is now passed to Jest explicitly.
But the test doesn't know about the config.

To fix this, we just run it via `yarn test` (which includes the config).
We already depend on Yarn for development anyway.

* Add yarn test-prod to run Jest with production environment

* Actually flip the production tests to run in prod environment

This produces a bunch of errors:

Test Suites: 64 failed, 58 passed, 122 total
Tests:       740 failed, 26 skipped, 1809 passed, 2575 total
Snapshots:   16 failed, 4 passed, 20 total

* Ignore expectDev() calls in production

Down from 740 to 175 failed.

Test Suites: 44 failed, 78 passed, 122 total
Tests:       175 failed, 26 skipped, 2374 passed, 2575 total
Snapshots:   16 failed, 4 passed, 20 total

* Decode errors so tests can assert on their messages

Down from 175 to 129.

Test Suites: 33 failed, 89 passed, 122 total
Tests:       129 failed, 1029 skipped, 1417 passed, 2575 total
Snapshots:   16 failed, 4 passed, 20 total

* Remove ReactDOMProduction-test

There is no need for it now. The only test that was special is moved into ReactDOM-test.

* Remove production switches from ReactErrorUtils

The tests now run in production in a separate pass.

* Add and use spyOnDev() for warnings

This ensures that by default we expect no warnings in production bundles.
If the warning *is* expected, use the regular spyOn() method.

This currently breaks all expectDev() assertions without __DEV__ blocks so we go back to:

Test Suites: 56 failed, 65 passed, 121 total
Tests:       379 failed, 1029 skipped, 1148 passed, 2556 total
Snapshots:   16 failed, 4 passed, 20 total

* Replace expectDev() with expect() in __DEV__ blocks

We started using spyOnDev() for console warnings to ensure we don't *expect* them to occur in production. As a consequence, expectDev() assertions on console.error.calls fail because console.error.calls doesn't exist. This is actually good because it would help catch accidental warnings in production.

To solve this, we are getting rid of expectDev() altogether, and instead introduce explicit expectation branches. We'd need them anyway for testing intentional behavior differences.

This commit replaces all expectDev() calls with expect() calls in __DEV__ blocks. It also removes a few unnecessary expect() checks that no warnings were produced (by also removing the corresponding spyOnDev() calls).

Some DEV-only assertions used plain expect(). Those were also moved into __DEV__ blocks.

ReactFiberErrorLogger was special because it console.error()'s in production too. So in that case I intentionally used spyOn() instead of spyOnDev(), and added extra assertions.

This gets us down to:

Test Suites: 21 failed, 100 passed, 121 total
Tests:       72 failed, 26 skipped, 2458 passed, 2556 total
Snapshots:   16 failed, 4 passed, 20 total

* Enable User Timing API for production testing

We could've disabled it, but seems like a good idea to test since we use it at FB.

* Test for explicit Object.freeze() differences between PROD and DEV

This is one of the few places where DEV and PROD behavior differs for performance reasons.
Now we explicitly test both branches.

* Run Jest via "yarn test" on CI

* Remove unused variable

* Assert different error messages

* Fix error handling tests

This logic is really complicated because of the global ReactFiberErrorLogger mock.
I understand it now, so I added TODOs for later.

It can be much simpler if we change the rest of the tests that assert uncaught errors to also assert they are logged as warnings.
Which mirrors what happens in practice anyway.

* Fix more assertions

* Change tests to document the DEV/PROD difference for state invariant

It is very likely unintentional but I don't want to change behavior in this PR.
Filed a follow up as https://github.com/facebook/react/issues/11618.

* Remove unnecessary split between DEV/PROD ref tests

* Fix more test message assertions

* Make validateDOMNesting tests DEV-only

* Fix error message assertions

* Document existing DEV/PROD message difference (possible bug)

* Change mocking assertions to be DEV-only

* Fix the error code test

* Fix more error message assertions

* Fix the last failing test due to known issue

* Run production tests on CI

* Unify configuration

* Fix coverage script

* Remove expectDev from eslintrc

* Run everything in band

We used to before, too. I just forgot to add the arguments after deleting the script.
2017-11-22 13:02:26 +00:00
Matteo Vesprini-Heidrich c6bde7b99f support Call and Return components in React.Children calls (#11422)
* support Call and Return components in React.Children calls

* make tests more verbose

* fix ordering of React component types

* cleanup conditional detection of children type

* directly inline callback invocation

* reduce callback invocation code re-use
2017-11-20 22:06:37 +00:00
Brian Vaughn dbf715c958
Read debugRenderPhaseSideEffects from GK (#11603)
* Forked ReactFeatureFlags for React Native to enable debugRenderPhaseSideEffects GK
* Changed debugRenderPhaseSideEffects in www feature flags to be runtime as well
2017-11-20 14:05:53 -08:00
Tim Jacobi 669a70dab7 Rewrite SyntheticEvent tests using public APIs only (#11525)
* generate synthetics events using public API

* rewritten createEvent to use public APIs
* removed all references SyntheticEvent.release

In order to test under realistic circumstances I had to move
the expectations into a callback in mosts tests to overcome
the effects of event pooling.

* run prettier

* remove empty line

* don't use ReactTestUtils

* run prettier and fix linter issues

* remove duplicate test

* remove invalid calls to expect

The removed `expect` calls verified the correct behaviour based on
missing `preventDefault` and `stopPropagation` methods.
The was correct as we used plain objects to simulate events.
Since we switched to the public API we're using native events which
do have these methods.

* set event.defaultPrevented to undefined

This was missed when the test was first migrated.
When emulating IE8 not only has returnValue to be false.
In addition defaultPrevented must not be defined.

* run all tests and format code

* rename instance variable to node

* remove backtick

* only simulate IE in normalisation test

* include assignment in definition

* add missing `persist` test

* use method instead of field to prevent default

* expect properties to be unchanged on persisted event

* optimise tests that deal with event persitence

* declare and assign `event` on the same line if not reassigned later
2017-11-20 14:29:27 +00:00
cristidrg bd9dbd5d60 Remove MouseWheel and MouseDOMScroll event patching
The `wheel` event has not always been supported in every browser. React would fall back to `mousewheel` and `DOMMouseScroll` when the `wheel` event was not available. All supported browsers provide the `wheel` event. This code is no longer necessary.
2017-11-20 07:40:57 -05:00
landvibe 70abda5b92 Switching the name property preserves radio selection
Fixes a case where changing the name and checked value of a radio button in the same update would lead to checking the wrong radio input. Also adds a DOM test fixture for related issue.

Related issues:
https://github.com/facebook/react/issues/7630
2017-11-19 10:44:35 -05:00
Raphael Amorim 3f405da614 Migrating to const/let and Object Spread in more places (#11535)
* Use const/let in more places (#11467)

* Convert ReactDOMFiberTextarea to const/let
* Convert ReactDOMSelection to const/let
* Convert setTextContent to const/let
* Convert validateDOMNesting to const/let

* Replace Object.assign by Object Spread

* Convert ReactDOMFiberOption to Object Spread
* Convert ReactDOMFiberTextarea to Object Spread
* Convert validateDOMNesting to Object Spread
2017-11-19 14:53:55 +00:00
Gordon Dent aa0b7418c1 Rewrite ReactDOMComponentTree-test to test behavior using Public API (#11383)
* Rewrite ReactDOMComponentTree-test to test behavior using Public API

 - Part of #11299
 - I've tried to identify cases where code within ReactDOMComponentTree is exercised and have updated accordingly but I'm not entirely sure whether I'm on the right track. I thought I'd PR to get feedback from the community. Looking forward to comments.

* Prettier and lint changes

* Remove testing of internals and add test cases for testing behavior exhibited after use of getInstanceFromNode

* [RFC] Update testing approach to verify exhibited behavior dependent upon methods in ReactDOMComponentTree

* Remove tests from event handlers and use sync tests

* Prettier changes

* Rename variables to be more semantic

* Prettier updates

* Update test following review

 - Use beforeEach and afterEach to set up and tear down container element for use in each test
 - Move any functions specific to one test to within test body (improves readability imo)

* Add coverage for getNodeFromInstance and implementation of getFiberCurrentPropsFromNode
 - After researching usage of getNodeFromInstance we can test getNodeFromInstance dispatching some events and asserting the id of the currentTarget
 - After checking git blame for getFiberCurrentPropsFromNode and reading through #8607 I found a test that we can simplify to assert behavior of the function by ensuring event handler props are updated from the fiber props. Swapping out the implementation of this function with `return node[internalInstanceKey].memoizedProps` results in a failure.
2017-11-19 14:18:16 +00:00
Brian Vaughn 7f68544f0d
New feature flags to help detect unexpected lifecycle side effects (#11587)
Added `debugRenderPhaseSideEffects` feature flag to help detect unexpected side effects in pre-commit lifecycle hooks and `setState` reducers.
2017-11-17 10:49:54 -08:00
Andrew Clark 4a924a2067
Updates at the same priority should not interrupt current render (#11578)
When we're rendering work at a specific level, and a higher priority
update comes in, we interrupt the current work and restart at the
higher priority. The rationale is that the high priority update is
likely cheaper to render that the lower one, so it's usually worth
throwing out the current work to get the high pri update on the screen
as soon as possible.

Currently, we also interrupt the current work if an update of *equal*
priority is scheduled. The rationale here is less clear: the only reason
to do this is if both updates are expected to flush at the same time,
to prevent tearing. But this usually isn't the case. Separate setStates
are usually distinct updates that can be flushed separately, especially
if the components that are being updated are in separate subtrees.

An exception is in Flux-like systems where multiple setStates are the
result of a single conceptual update/event/dispatch. We can add an
explicit API for batching in the future; in fact, we'd likely need one
anyway to account for expiration accidentally causing consecutive
updates to fall into separate buckets.
2017-11-16 16:59:02 -08:00
Andrew Clark fd03a86429
Always reconcile against current children (#11564)
The new resuming algorithm will always reconcile against the current
child set, even if there's a newer work-in-progress child set.
2017-11-16 16:58:53 -08:00
Jason Quense e0e9131040
Update value tracking on cousin radios (#11028)
* fix radio updates

* Format fixtures and ReactDOMFiberInput
2017-11-16 09:08:14 -05:00
Andrew Clark 9b36df86c6
Use requestIdleCallback timeout to force expiration (#11548)
* Don't call idle callback unless there's time remaining

* Expiration fixture

Fixture that demonstrates how async work expires after a certain interval.
The fixture clogs the main thread with animation work, so it only works if the
`timeout` option is provided to `requestIdleCallback`.

* Pass timeout option to requestIdleCallback

Forces `requestIdleCallback` to fire if too much time has elapsed, even if the
main thread is busy. Required to make expiration times work properly. Otherwise,
async work can expire, but React never has a chance to flush it because the
browser never calls into React.
2017-11-15 13:46:17 -08:00
Andrew Clark 77f576ce16
Bugfix: nextFlushedRoot should always be set when performing work (#11558)
Fixes an issue where performWorkOnRoot was called, but nextFlushedRoot
was not set. This happened in a special branch where we synchronously
flush newly mounted DOM trees outside the normal work loop.

Arguably, performWorkOnRoot should read from the globally assigned root
and expiration time instead of accepting arguments, since those
arguments are expected to be the same as the global values, anyway. I
decided against that since the global values could be null, so reading
from them would require extra null checks.
2017-11-15 12:17:21 -08:00
Brian Vaughn 3322f6bf31
Re-add haste modules for ReactTypes and ReactNativeRTTypes shims (#11557)
* Re-add haste module for ReactNativeRTTypes

* Re-added ReactTypes @providesModule annotation as well

* Updated expected provides modules list

* Improved clarity of check_modules.sh error message

* Added ReactTypes to provides module whitelist
2017-11-15 08:17:15 -08:00
Dean Brophy 634b70a78b Add Flow types for EventPluginHub (#11465)
* Add Flow types for EventPluginHub

* add boolean and remove extraneous typing
2017-11-15 01:48:40 +00:00
Dan Abramov 7c5c9dd739 Updating package versions for release 16.1.1 2017-11-13 16:08:08 +00:00
Dan Abramov afc5fab26c
Don't emit autoFocus={false} attribute on the server (#11543) 2017-11-13 15:22:12 +00:00
Matt Travi 901a091fe0 Unfreeze the react-dom/server interface (#11531)
* Unfreeze the react-dom/server interface

this allows stubbing of the exposed named functions, as was possible before v16.1

fixes #11526

* Fix missing version export

* Fix missing version export

* Whitespace
2017-11-13 13:52:59 +00:00
Max Schmeling 2fe3494f0d Support string values for capture attribute. (#11424)
* Uses HAS_OVERLOADED_BOOLEAN_VALUE instead of HAS_BOOLEAN_VALUE
  * Allows for <input type="file" capture="user" />
Fixes #11419
2017-11-12 09:29:27 -05:00
Sebastian Markbåge acabf11245
Update Flow and Fix Hydration Types (#11493)
* Update Flow

* Fix createElement() issue

The * type was too ambiguous. It's always a string so what's the point?

Suppression for missing Flow support for {is: ''} web component argument to createElement() didn't work for some reason.
I don't understand what the regex is testing for anyway (a task number?) so I just removed that, and suppression got fixed.

* Remove deleted $Abstract<> feature

* Expand the unsound isAsync check

Flow now errors earlier because it can't find .type on a portal.

* Add an unsafe cast for the null State in UpdateQueue

* Introduce "hydratable instance" type

The Flow error here highlighted a quirk in our typing of hydration.
React only really knows about a subset of all possible nodes that can
exist in a hydrated tree. Currently we assume that the host renderer
filters them out to be either Instance or TextInstance. We also assume
that those are different things which they might not be. E.g. it could
be fine for a renderer to render "text" as the same type as one of the
instances, with some default props.

We don't really know what it will be narrowed down to until we call
canHydrateInstance or canHydrateTextInstance. That's when the type is
truly refined.

So to solve this I use a different type for hydratable instance that is
used in that temporary stage between us reading it from the DOM and until
it gets refined by canHydrate(Text)Instance.

* Have the renderer refine Hydratable Instance to Instance or Text Instance

Currently we assume that if canHydrateInstance or canHydrateTextInstance
returns true, then the types also match up. But we don't tell that to Flow.

It just happens to work because `fiber.stateNode` is still `any`.

We could potentially use some kind of predicate typing but instead
of that I can just return null or instance from the "can" tests.

This ensures that the renderer has to do the refinement properly.
2017-11-11 17:00:33 -08:00
Dan Abramov 13c491a828
Refactor some event tests (#11517)
* Use dispatchEvent() directly

Don't fear repetition in tests. It is clearer what's going on.

* Clean up the container after tests

* Add a comment to container code
2017-11-10 16:58:44 +00:00
DouglasGimli b4b09cb8bb Rewrite SyntheticWheelEvent-test depending on internal API (#11299) (#11367)
* Update SyntheticWheelEvent tests to use public API

* Replace: ReactTestUtils.SimulateNative to native Events()

* Update: Replaced WheelEvent() interface to document.createEvent

* Fix: Lint SyntheticWheelEvent file

* Update: Custom WheelEvent function to a generic MouseEvent function

* Update: Prettier SyntheticWheelEvent-test.js

* Verify the `button` property is set on synthetic event

* Use MouseEvent constructor over custom helper

* Rewrite to test React rather than jsdom

* Force the .srcElement code path to execute

* Style tweaks and slight code reorganization
2017-11-10 16:39:39 +00:00
Dan Abramov 94907cdc5f
Fix lint 2017-11-10 16:30:38 +00:00
Bernardo Smaniotto 7c150a8078 Refactor SyntheticClipboardEvent tests to only use the public API (#11365)
* Refactor SyntheticClipboardEvent tests to only use the public API

* Replace local document creation by document body reset on each test case execution

* Set up and tear down container separately

* Tweak test assertion logic for clarity

* Remove simulate abstraction and create events directly

* Ensure the test covers IE8 behavior

* Verify that persistence works
2017-11-10 15:53:20 +00:00
Andrew Clark c580082861
Measure time between scheduling an async callback and flushing it (#11506)
* Measure time between scheduling an async callback and flushing it

Helps detect starvation issues.

* Debug comments should print directly above the next measure

* Better warning message

Most users won't know what "expires" means
2017-11-10 12:14:25 +00:00
Audy Tanudjaja ae7639c116 Remove tests in ReactDOMComponent-test depending on internal API (#11337)
* Remove inputValueTracking from ReactDOMComponent-test dependency

* prettier

* use node._valueTracker and add some test cases to make sure that value being tracked

* using Object.getOwnPropertyDescriptor to get the tracked value

* move getValueTracker to each test case and use its corresponding prototype

* remove tests and move the value tracker definition before React is imported

* Delete these tests completely
2017-11-10 12:01:59 +00:00
Dan Abramov 54051f9738
Fix accidental leftover requires (#11513) 2017-11-10 11:43:13 +00:00
Kristofer Selbekk 5bfb878743 Add note about mistaken named / default export (#11505)
This commit adds a note about the possibility of erroneously
mistaking named and default exports to an existing error message.
2017-11-09 18:28:35 +00:00
Dan Abramov 7e8b0c5800 Updating package versions for release 16.1.0 2017-11-09 14:53:27 +00:00
Dan Abramov 2437e2c3da Updating package versions for release 16.1.0-rc 2017-11-08 22:54:10 +00:00