feat: add hourly portfolio sync history
This commit is contained in:
@@ -40,6 +40,7 @@ describe('persistent portfolio projection', () => {
|
||||
accounts: [],
|
||||
work: [],
|
||||
});
|
||||
repository.publish.mockResolvedValue(true);
|
||||
metadata.savedMany.mockResolvedValue(new Map());
|
||||
metadata.request.mockResolvedValue(null);
|
||||
});
|
||||
@@ -95,7 +96,7 @@ describe('persistent portfolio projection', () => {
|
||||
],
|
||||
work: [],
|
||||
});
|
||||
await service.read('user', 'a');
|
||||
await service.request('user', 'private', 'a');
|
||||
for (
|
||||
let index = 0;
|
||||
index < 10 && !repository.publish.mock.calls.length;
|
||||
@@ -189,10 +190,10 @@ describe('persistent portfolio projection', () => {
|
||||
accounts: [account, { ...account, accountId: 'b', portfolio: null }],
|
||||
work: [],
|
||||
});
|
||||
const partial = await service.read('user', 'all', true);
|
||||
const partial = await service.read('user', 'all');
|
||||
expect(partial.data).toBeNull();
|
||||
expect(partial.meta.availability).toBe('partial');
|
||||
const saved = await service.saved('user', 'all', true);
|
||||
const saved = await service.saved('user', 'all');
|
||||
expect(saved.accounts[0].snapshot?.totalsByCurrency).toEqual(
|
||||
snapshot.totalsByCurrency,
|
||||
);
|
||||
@@ -210,7 +211,7 @@ describe('persistent portfolio projection', () => {
|
||||
],
|
||||
work: [],
|
||||
});
|
||||
const complete = await service.read('user', 'all', true);
|
||||
const complete = await service.read('user', 'all');
|
||||
expect(complete.data?.totalsByCurrency).toEqual([
|
||||
{ currency: 'RUB', value: '2.000000002' },
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user