@@ -9,23 +9,23 @@ describe('formatBytes', () => {
99 expect ( formatBytes ( { value : 100_000_000_000_000 } ) ) . toBe ( '100 TB' ) ;
1010 } ) ;
1111 it ( 'should convert to size' , ( ) => {
12- expect ( formatBytes ( { value : 100_000 , size : 'b' } ) ) . toBe ( '100, 000 B' ) ;
13- expect ( formatBytes ( { value : 100_000_000_000_000 , size : 'gb' } ) ) . toBe ( '100, 000 GB' ) ;
12+ expect ( formatBytes ( { value : 100_000 , size : 'b' } ) ) . toBe ( '100 000 B' ) ;
13+ expect ( formatBytes ( { value : 100_000_000_000_000 , size : 'gb' } ) ) . toBe ( '100 000 GB' ) ;
1414 } ) ;
1515 it ( 'should convert without labels' , ( ) => {
16- expect ( formatBytes ( { value : 100_000 , size : 'b' , withSizeLabel : false } ) ) . toBe ( '100, 000' ) ;
16+ expect ( formatBytes ( { value : 100_000 , size : 'b' , withSizeLabel : false } ) ) . toBe ( '100 000' ) ;
1717 expect ( formatBytes ( { value : 100_000_000_000_000 , size : 'gb' , withSizeLabel : false } ) ) . toBe (
18- '100, 000' ,
18+ '100 000' ,
1919 ) ;
2020 } ) ;
2121 it ( 'should convert to speed' , ( ) => {
2222 expect ( formatBytes ( { value : 100_000 , withSpeedLabel : true } ) ) . toBe ( '100 KB/s' ) ;
23- expect ( formatBytes ( { value : 100_000 , size : 'b' , withSpeedLabel : true } ) ) . toBe ( '100, 000 B/s' ) ;
23+ expect ( formatBytes ( { value : 100_000 , size : 'b' , withSpeedLabel : true } ) ) . toBe ( '100 000 B/s' ) ;
2424 } ) ;
2525 it ( 'should return fixed amount of significant digits' , ( ) => {
26- expect ( formatBytes ( { value : 99_000 , significantDigits : 2 } ) ) . toEqual ( '99, 000 B' ) ;
26+ expect ( formatBytes ( { value : 99_000 , significantDigits : 2 } ) ) . toEqual ( '99 000 B' ) ;
2727 expect ( formatBytes ( { value : 100_000 , significantDigits : 2 } ) ) . toEqual ( '100 KB' ) ;
28- expect ( formatBytes ( { value : 99_000_000_000_000 , significantDigits : 2 } ) ) . toEqual ( '99, 000 GB' ) ;
28+ expect ( formatBytes ( { value : 99_000_000_000_000 , significantDigits : 2 } ) ) . toEqual ( '99 000 GB' ) ;
2929 expect ( formatBytes ( { value : 100_000_000_000_000 , significantDigits : 2 } ) ) . toEqual ( '100 TB' ) ;
3030 } ) ;
3131 it ( 'should return empty string on invalid data' , ( ) => {
0 commit comments