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

Commit 9f65353

Browse files
author
vikasrohit
committed
Merge pull request #652 from appirio-tech/feature/sup-2943-add-volatility-srm-stats
SUP-2943, Add volatility to top-line SRM stats on Profile
2 parents 39672b5 + 0d1a592 commit 9f65353

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

app/services/userStats.service.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
{key: 'rank.rating', label: 'rating', postFunc: null},
4242
{key: 'rank.rank', label: 'rank', postFunc: null},
4343
{key: 'rank.percentile', label: 'percentile', postFunc: percentileFunc},
44-
{key: 'challenges', label:'competitions', postFunc: null}
44+
{key: 'challenges', label:'competitions', postFunc: null},
45+
{key: 'rank.volatility', label: 'volatility', postFunc: null}
4546
],
4647
'DATA_SCIENCE.MARATHON_MATCH': [
4748
{key: 'rank.rating', label: 'rating', postFunc: null},

app/services/userStats.service.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ describe('User Stats Service', function() {
3939

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

4747

0 commit comments

Comments
 (0)