refactor analytics module

This commit is contained in:
2025-12-21 22:51:08 +01:00
parent 9bd2e630e6
commit 0f60200917
14 changed files with 133 additions and 75 deletions

View File

@@ -25,9 +25,19 @@ describe('GetDashboardDataPresenter', () => {
totalRaces: 20,
totalLeagues: 5,
});
expect(presenter.responseModel).toEqual({
totalUsers: 100,
activeUsers: 50,
totalRaces: 20,
totalLeagues: 5,
});
});
it('getResponseModel throws if not presented', () => {
expect(() => presenter.getResponseModel()).toThrow('Presenter not presented');
});
it('responseModel throws if not presented', () => {
expect(() => presenter.responseModel).toThrow('Presenter not presented');
});
});