Skip to content

Commit

Permalink
Expose batchedUpdates on shallow renderer (#9382)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Apr 8, 2017
1 parent b563af4 commit 69933e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/renderers/testing/ReactShallowRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ class ReactShallowRenderer {
ReactReconciler.unmountComponent(this._instance, false);
}
}
unstable_batchedUpdates(callback, bookkeeping) {
// This is used by Enzyme for fake-simulating events in shallow mode.
injectDefaults();
return ReactUpdates.batchedUpdates(callback, bookkeeping);
}
_render(element, transaction, context) {
if (this._instance) {
ReactReconciler.receiveComponent(
Expand Down

0 comments on commit 69933e2

Please sign in to comment.