'use strict';

describe('Filter: countFormat', function () {

  // load the filter's module
  beforeEach(module('sumaAnalysis'));

  // initialize a new instance of the filter before each test
  var countFormat;
  beforeEach(inject(function ($filter) {
    countFormat = $filter('countFormat');
  }));

  it('should format numbers with thousands separator:"', function () {
    var text = '10000';
    expect(countFormat(text)).to.equal('10,000');
  });

});

@@ -379,24 +379,219 @@
 var 
-text = '10000';%0A
+numbers = %7B%0A      1000: '1,000',%0A      10000: '10,000',%0A      100000: '100,000',%0A      1000000: '1,000,000',%0A      10000000: '10,000,000',%0A      100000000: '100,000,000'%0A    %7D;%0A%0A    for (var num in numbers) %7B%0A  
     
@@ -613,12 +613,11 @@
 mat(
-text
+num
 )).t
@@ -628,26 +628,34 @@
 ual(
-'10,000');
+numbers%5Bnum%5D)%0A    %7D
 %0A  %7D);%0A
-%0A
 %7D);%0A

update countFormat tests