Dashboard page: unit tests refactoring

This commit is contained in:
gianantoniopini
2021-01-26 13:19:49 +01:00
parent b196ca1bf5
commit e27bedcf88
3 changed files with 32 additions and 22 deletions

View File

@ -185,7 +185,7 @@ class Reference {
await delay(DatabaseConstants.defaultDelayInMilliseconds);
return Promise.resolve(this._dataSnapshot);
return this._dataSnapshot;
}
orderByChild(path) {
@ -197,24 +197,18 @@ class Reference {
await delay(DatabaseConstants.defaultDelayInMilliseconds);
this._handleDataUpdate(value);
return Promise.resolve();
}
async remove() {
await delay(DatabaseConstants.defaultDelayInMilliseconds);
this._handleDataUpdate(null);
return Promise.resolve();
}
async set(value) {
await delay(DatabaseConstants.defaultDelayInMilliseconds);
this._handleDataUpdate(value);
return Promise.resolve();
}
}