Skip to content

Commit

Permalink
[Fiber] Add tests for scheduling inside callbacks (#8186)
Browse files Browse the repository at this point in the history
* Add tests for scheduling inside callbacks

* Don't test implementation details
  • Loading branch information
gaearon committed Nov 2, 2016
1 parent 75f4ab2 commit eb674e4
Show file tree
Hide file tree
Showing 3 changed files with 397 additions and 101 deletions.
12 changes: 12 additions & 0 deletions scripts/fiber/tests-passing.txt
Expand Up @@ -819,6 +819,18 @@ src/renderers/shared/fiber/__tests__/ReactIncrementalScheduling-test.js
* splits deferred work on multiple roots
* works on deferred roots in the order they were scheduled
* handles interleaved deferred and animation work
* performs animation work in animation callback
* schedules deferred work in animation callback
* schedules deferred work and performs animation work in animation callback
* performs animation work and schedules deferred work in animation callback
* performs deferred work in deferred callback if it has time
* schedules deferred work in deferred callback if it runs out of time
* performs animated work in deferred callback if it has time
* performs animated work and deferred work in deferred callback if it has time
* performs deferred and animated work work in deferred callback if it has time
* FIXME: schedules animated work as if it was deferred in deferred callback if it runs out of time
* schedules animated work and deferred work in deferred callback if it runs out of time
* schedules deferred work and animated work in deferred callback if it runs out of time

src/renderers/shared/fiber/__tests__/ReactIncrementalSideEffects-test.js
* can update child nodes of a host instance
Expand Down
8 changes: 0 additions & 8 deletions src/renderers/noop/ReactNoop.js
Expand Up @@ -172,14 +172,6 @@ var ReactNoop = {
}
},

hasScheduledDeferredCallback() {
return Boolean(scheduledDeferredCallback);
},

hasScheduledAnimationCallback() {
return Boolean(scheduledAnimationCallback);
},

// Shortcut for testing a single root
render(element : ReactElement<any>, callback: ?Function) {
ReactNoop.renderToRootWithID(element, DEFAULT_ROOT_ID, callback);
Expand Down

0 comments on commit eb674e4

Please sign in to comment.