mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 00:23:03 +00:00
refactor: move web http client to a new file
This commit is contained in:
@@ -48,8 +48,8 @@ describe('StorageProvider', () => {
|
||||
|
||||
it('should call set method of storage to put a value', () => {
|
||||
spyOn(storage, 'set');
|
||||
storageProvider.put('some-uid', { some: 'thing' });
|
||||
expect(storage.set).toHaveBeenCalledWith('some-uid', { some: 'thing' });
|
||||
storageProvider.put('some-uid', {some: 'thing'});
|
||||
expect(storage.set).toHaveBeenCalledWith('some-uid', {some: 'thing'});
|
||||
});
|
||||
|
||||
it('should call get method of storage to get a value', () => {
|
||||
@@ -99,7 +99,7 @@ describe('StorageProvider', () => {
|
||||
spyOn(storageProvider, 'get').and.callThrough();
|
||||
await storageProvider.putMultiple(sampleEntries);
|
||||
const entries = await storageProvider.getAll();
|
||||
expect(Array.from(entries.values()).map((item) => (item.foo) ? item.foo : item).sort())
|
||||
expect(Array.from(entries.values()).map((item) => (item.foo) ? item.foo : item).sort())
|
||||
.toEqual(Array.from(sampleEntries.values()).map((item) => (item.foo) ? item.foo : item).sort());
|
||||
expect(Array.from(entries.keys()).sort()).toEqual(['bar', 'foo', 'foobar']);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user