From 16afd01662f96575c05901c471f622d599768590 Mon Sep 17 00:00:00 2001 From: Clement Denis Date: Fri, 11 Sep 2020 15:38:32 +0200 Subject: [PATCH] js: add 5 ms delay to compensate from potentially slow server --- js/tests/debounce_test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/tests/debounce_test.js b/js/tests/debounce_test.js index a453af2f..9dea8278 100644 --- a/js/tests/debounce_test.js +++ b/js/tests/debounce_test.js @@ -27,7 +27,7 @@ const setIntervalSync = (fn, delay, limit = 0) => new Promise(s => { // if the trailing edge is true it will execute the callback before returning the array const run = async (callback, { delay, count }) => { const arr = [] - await setIntervalSync(() => callback(arr, 1), delay, count * delay) + await setIntervalSync(() => callback(arr, 1), delay, count * delay + 5) return arr.length }