mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 16:42:56 +00:00
feat(data): add method that checks if data item has been saved
This commit is contained in:
@@ -220,4 +220,10 @@ describe('DataProvider', () => {
|
||||
const result = await storageProvider.getAll();
|
||||
expect(Array.from(result.keys())).toEqual(['some-uid']);
|
||||
});
|
||||
|
||||
it('should properly check if a data item has already been saved', async () => {
|
||||
expect(await dataProvider.isSaved(sampleThing.uid)).toBeFalsy();
|
||||
await dataProvider.put(sampleThing);
|
||||
expect(await dataProvider.isSaved(sampleThing.uid)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user