Skip to content

Commit

Permalink
fix tests for options.debounceRendering
Browse files Browse the repository at this point in the history
  • Loading branch information
developit committed Mar 4, 2019
1 parent 5ad892f commit b421460
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/_util/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export function setupScratch() {
* @returns {() => void}
*/
export function setupRerender() {
Component.__test__previousDebounce = Component.debounce;
Component.debounce = cb => Component.__test__drainQueue = cb;
Component.__test__previousDebounce = options.debounceRendering;
options.debounceRendering = cb => Component.__test__drainQueue = cb;

return () => Component.__test__drainQueue && Component.__test__drainQueue();
}
Expand Down Expand Up @@ -55,7 +55,7 @@ export function teardown(scratch) {
}

if (typeof Component.__test__previousDebounce !== 'undefined') {
Component.debounce = Component.__test__previousDebounce;
options.debounceRendering = Component.__test__previousDebounce;
delete Component.__test__previousDebounce;
}

Expand Down

0 comments on commit b421460

Please sign in to comment.