Firebase mock: fix for property ServerValue.TIMESTAMP

This commit is contained in:
gianantoniopini
2020-12-22 17:08:37 +01:00
parent b9014eb6cb
commit a9c6ed4cdb
3 changed files with 49 additions and 4 deletions

View File

@ -157,9 +157,12 @@ const database = () => {
};
};
database.ServerValue = {
TIMESTAMP: Date.now(),
};
database.ServerValue = {};
Object.defineProperty(database.ServerValue, 'TIMESTAMP', {
get() {
return new Date().getTime();
},
});
export default class firebase {
static auth = auth;