diff --git a/test/unit/debounce.html b/test/unit/debounce.html
index 1c6e1520e5..f2fbc81935 100644
--- a/test/unit/debounce.html
+++ b/test/unit/debounce.html
@@ -216,16 +216,22 @@
const timeoutCallback = sinon.spy(() => actualCallbacks.push(timeoutCallback));
Polymer.enqueueDebouncer(Polymer.Debouncer.debounce(null, Polymer.Async.timeOut, timeoutCallback));
// Set of short-running debouncers enqueued in the middle of first set
- const nestedCallbacks = new Array(150).fill().map((_, i) => sinon.spy(() =>
- actualCallbacks.push(nestedCallbacks[i])));
+ const nestedCallbacks = [];
+ for (let i=0; i<150; i++) {
+ nestedCallbacks.push(sinon.spy(() =>
+ actualCallbacks.push(nestedCallbacks[i])));
+ }
// First set of short-running debouncers
- const microtaskCallbacks = new Array(150).fill().map((_, i) => sinon.spy(() => {
- actualCallbacks.push(microtaskCallbacks[i]);
- if (i === 125) {
- nestedCallbacks.forEach(cb =>
- Polymer.enqueueDebouncer(Polymer.Debouncer.debounce(null, Polymer.Async.microTask, cb)));
- }
- }));
+ const microtaskCallbacks = [];
+ for (let i=0; i<150; i++) {
+ microtaskCallbacks.push(sinon.spy(() => {
+ actualCallbacks.push(microtaskCallbacks[i]);
+ if (i === 125) {
+ nestedCallbacks.forEach(cb =>
+ Polymer.enqueueDebouncer(Polymer.Debouncer.debounce(null, Polymer.Async.microTask, cb)));
+ }
+ }));
+ }
microtaskCallbacks.forEach(cb =>
Polymer.enqueueDebouncer(Polymer.Debouncer.debounce(null, Polymer.Async.microTask, cb)));
// Expect short before long