Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

SUP-2943, Add volatility to top-line SRM stats on Profile #652

Merged
merged 1 commit into from
Jan 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/services/userStats.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
{key: 'rank.rating', label: 'rating', postFunc: null},
{key: 'rank.rank', label: 'rank', postFunc: null},
{key: 'rank.percentile', label: 'percentile', postFunc: percentileFunc},
{key: 'challenges', label:'competitions', postFunc: null}
{key: 'challenges', label:'competitions', postFunc: null},
{key: 'rank.volatility', label: 'volatility', postFunc: null}
],
'DATA_SCIENCE.MARATHON_MATCH': [
{key: 'rank.rating', label: 'rating', postFunc: null},
Expand Down
6 changes: 3 additions & 3 deletions app/services/userStats.service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ describe('User Stats Service', function() {

it('should return stats for data-science: srms ', function() {
var _data = UserStatsService.getIterableStats('DATA_SCIENCE', 'SRM', stats);
expect(_data).to.have.length(4);
expect(_.pluck(_data, 'label')).to.have.members(['rating', 'rank', 'percentile', 'competitions']);
expect(_.pluck(_data, 'val')).to.have.members(['799', '6,280', '26%', '10']);
expect(_data).to.have.length(5);
expect(_.pluck(_data, 'label')).to.have.members(['rating', 'rank', 'percentile', 'competitions', 'volatility']);
expect(_.pluck(_data, 'val')).to.have.members(['799', '6,280', '26%', '10', '473']);
});


Expand Down