This commit is contained in:
@@ -11,6 +11,7 @@ test('aggregates seller dashboard counts and financial totals', async () => {
|
||||
saleService: { async list() { return [{ status: 'COMPLETED', netProceedsMinor: 2200, profitMinor: 700 }]; } },
|
||||
acquisitionService: { async list() { return [{ costBasisMinor: 1500 }]; } },
|
||||
pricingRepository: { async listLatestValuationsForSeller() { return [{ inventoryItemId: 'item-1', valueMinor: 2800, calculatedAt: new Date() }]; } },
|
||||
pricingRefreshJobRepository: { async countFailedForSeller() { return 2; } },
|
||||
});
|
||||
|
||||
const dashboard = await service.get({ sellerId: 'seller-1' });
|
||||
@@ -25,6 +26,7 @@ test('aggregates seller dashboard counts and financial totals', async () => {
|
||||
missingImages: 0,
|
||||
missingPricing: 1,
|
||||
stalePricing: 0,
|
||||
failedPricingJobs: 2,
|
||||
});
|
||||
assert.deepEqual(dashboard.financials, {
|
||||
totalAcquisitionCostMinor: 1500,
|
||||
|
||||
Reference in New Issue
Block a user