Builder tests: added test for loading screen

This commit is contained in:
gianantoniopini
2021-01-20 15:52:35 +01:00
parent 1215071ab9
commit 4c63f68215
4 changed files with 56 additions and 30 deletions
@@ -149,7 +149,7 @@ class Reference {
const debouncedEventCallback = debounce(
this.eventCallbacks[eventType],
100,
DatabaseConstants.defaultDelayInMilliseconds,
);
debouncedEventCallback(snapshot);
}
@@ -183,6 +183,10 @@ class Reference {
throw new Error('eventType should be a string.');
}
await new Promise((resolve) =>
setTimeout(resolve, DatabaseConstants.defaultDelayInMilliseconds),
);
return Promise.resolve(this._dataSnapshot);
}