@@ -29,30 +29,30 @@ describe('User Stats Service', function() {
2929 var _data = UserStatsService . getIterableStats ( 'DEVELOP' , 'ASSEMBLY_COMPETITION' , stats )
3030 expect ( _data ) . to . have . length ( 6 )
3131
32- expect ( _ . pluck ( _data , 'val' ) ) . to . have . members ( [ '1,733' , '25' , '95%' , '16' , '10' , '80%' ] )
33- expect ( _ . pluck ( _data , 'label' ) ) . to . have . members ( [ 'rating' , 'rank' , 'percentile' , 'challenges' , 'wins' , 'reliability' ] )
32+ expect ( _ . map ( _data , 'val' ) ) . to . have . members ( [ '1,733' , '25' , '95%' , '16' , '10' , '80%' ] )
33+ expect ( _ . map ( _data , 'label' ) ) . to . have . members ( [ 'rating' , 'rank' , 'percentile' , 'challenges' , 'wins' , 'reliability' ] )
3434 } )
3535
3636 it ( 'should return stats for design-webdesign ' , function ( ) {
3737 var _data = UserStatsService . getIterableStats ( 'DESIGN' , 'WEB_DESIGNS' , stats )
3838 expect ( _data ) . to . have . length ( 2 )
39- expect ( _ . pluck ( _data , 'val' ) ) . to . have . members ( [ '190' , '418' ] )
40- expect ( _ . pluck ( _data , 'label' ) ) . to . have . members ( [ 'wins' , 'challenges' ] )
39+ expect ( _ . map ( _data , 'val' ) ) . to . have . members ( [ '190' , '418' ] )
40+ expect ( _ . map ( _data , 'label' ) ) . to . have . members ( [ 'wins' , 'challenges' ] )
4141 } )
4242
4343 it ( 'should return stats for data-science: srms ' , function ( ) {
4444 var _data = UserStatsService . getIterableStats ( 'DATA_SCIENCE' , 'SRM' , stats )
4545 expect ( _data ) . to . have . length ( 5 )
46- expect ( _ . pluck ( _data , 'label' ) ) . to . have . members ( [ 'rating' , 'rank' , 'percentile' , 'competitions' , 'volatility' ] )
47- expect ( _ . pluck ( _data , 'val' ) ) . to . have . members ( [ '799' , '6,280' , '26%' , '10' , '473' ] )
46+ expect ( _ . map ( _data , 'label' ) ) . to . have . members ( [ 'rating' , 'rank' , 'percentile' , 'competitions' , 'volatility' ] )
47+ expect ( _ . map ( _data , 'val' ) ) . to . have . members ( [ '799' , '6,280' , '26%' , '10' , '473' ] )
4848 } )
4949
5050
5151 it ( 'should return stats for Copilot ' , function ( ) {
5252 var _data = UserStatsService . getIterableStats ( 'COPILOT' , 'COPILOT' , stats )
5353 expect ( _data ) . to . have . length ( 5 )
54- expect ( _ . pluck ( _data , 'label' ) ) . to . have . members ( [ 'active challenges' , 'active projects' , 'total challenges' , 'total projects' , 'fulfillment' ] )
55- expect ( _ . pluck ( _data , 'val' ) ) . to . have . members ( [ 0 , '1' , '24' , '3' , '84%' ] )
54+ expect ( _ . map ( _data , 'label' ) ) . to . have . members ( [ 'active challenges' , 'active projects' , 'total challenges' , 'total projects' , 'fulfillment' ] )
55+ expect ( _ . map ( _data , 'val' ) ) . to . have . members ( [ 0 , '1' , '24' , '3' , '84%' ] )
5656 } )
5757 } )
5858
@@ -322,7 +322,7 @@ describe('User Stats Service', function() {
322322 } ]
323323 var filtered = UserStatsService . filterStats ( toTest )
324324 expect ( filtered ) . to . exist . to . have . length ( 3 )
325- expect ( _ . pluck ( filtered , 'showStats' ) ) . to . have . members ( [ true , true , true ] )
325+ expect ( _ . map ( filtered , 'showStats' ) ) . to . have . members ( [ true , true , true ] )
326326 } )
327327 } )
328328
0 commit comments