mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 08:42:08 +10:00
Builder.test: added draft version of test for data update
This commit is contained in:
@ -125,17 +125,37 @@ const database = () => {
|
||||
return Promise.resolve();
|
||||
};
|
||||
|
||||
const update = async (value) => {
|
||||
console.log('update');
|
||||
console.log(value);
|
||||
if (resumesPath) {
|
||||
if (value === null) {
|
||||
delete __resumesDictionary[databaseLocationId];
|
||||
} else {
|
||||
__resumesDictionary[databaseLocationId] = value;
|
||||
}
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
};
|
||||
|
||||
return {
|
||||
once,
|
||||
set,
|
||||
update,
|
||||
};
|
||||
};
|
||||
|
||||
const ServerValue = {
|
||||
TIMESTAMP: Date.now(),
|
||||
};
|
||||
|
||||
return {
|
||||
__demoResumeId,
|
||||
__emptyResumeId,
|
||||
__init,
|
||||
ref,
|
||||
ServerValue,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user