@@ -21,8 +21,8 @@ exports.filesize = {
2121 test . equal ( filesize ( this . kilobit , { round : 1 } ) , "500 B" , "Should be '500 B'" ) ;
2222 test . equal ( filesize ( this . kilobit , { round : 1 , spacer : "" } ) , "500B" , "Should be '500B'" ) ;
2323 test . equal ( filesize ( this . kilobit , { unix : true } ) , "500" , "Should be '500'" ) ;
24- test . equal ( filesize ( this . kilobit , { round : 1 , bits : true } ) , "3.9 Kb " , "Should be '3.9 Kb '" ) ;
25- test . equal ( filesize ( this . kilobit , { bits : true } ) , "3.91 Kb " , "Should be '3.91 Kb '" ) ;
24+ test . equal ( filesize ( this . kilobit , { round : 1 , bits : true } ) , "3.9 Kbit " , "Should be '3.9 Kbit '" ) ;
25+ test . equal ( filesize ( this . kilobit , { bits : true } ) , "3.91 Kbit " , "Should be '3.91 Kbit '" ) ;
2626 test . equal ( filesize ( this . kilobit , { unix : true , bits : true } ) , "3.9K" , "Should be '3.9K'" ) ;
2727 test . equal ( filesize ( this . kilobit , { bits : true , output : "array" } ) [ 0 ] , 3.91 , "Should be '3.91'" ) ;
2828 test . equal ( filesize ( this . kilobit , { bits : true , output : "object" } ) . value , 3.91 , "Should be '3.91'" ) ;
@@ -32,8 +32,8 @@ exports.filesize = {
3232 test . equal ( filesize ( this . kilobyte , { round : 1 } ) , "1 KB" , "Should be '1 KB'" ) ;
3333 test . equal ( filesize ( this . kilobyte , { round : 1 , spacer : "" } ) , "1KB" , "Should be '1KB'" ) ;
3434 test . equal ( filesize ( this . kilobyte , { unix : true } ) , "1K" , "Should be '1K'" ) ;
35- test . equal ( filesize ( this . kilobyte , { bits : true } ) , "8 Kb " , "Should be '8 Kb '" ) ;
36- test . equal ( filesize ( this . kilobyte , { round : 1 , bits : true } ) , "8 Kb " , "Should be '8 Kb '" ) ;
35+ test . equal ( filesize ( this . kilobyte , { bits : true } ) , "8 Kbit " , "Should be '8 Kbit '" ) ;
36+ test . equal ( filesize ( this . kilobyte , { round : 1 , bits : true } ) , "8 Kbit " , "Should be '8 Kbit '" ) ;
3737 test . equal ( filesize ( this . kilobyte , { unix : true , bits : true } ) , "8K" , "Should be '8K'" ) ;
3838 test . equal ( filesize ( this . kilobyte , { exponent : 0 } ) , "1024 B" , "Should be '1024 B'" ) ;
3939 test . equal ( filesize ( this . kilobyte , { exponent : 0 , output : "object" } ) . unit , "B" , "Should be 'B'" ) ;
@@ -43,27 +43,27 @@ exports.filesize = {
4343 test . equal ( filesize ( this . neg , { round : 1 } ) , "-1 KB" , "Should be '-1 KB'" ) ;
4444 test . equal ( filesize ( this . neg , { round : 1 , spacer : "" } ) , "-1KB" , "Should be '-1KB'" ) ;
4545 test . equal ( filesize ( this . neg , { unix : true } ) , "-1K" , "Should be '-1K'" ) ;
46- test . equal ( filesize ( this . neg , { bits : true } ) , "-8 Kb " , "Should be '-8 Kb '" ) ;
47- test . equal ( filesize ( this . neg , { round : 1 , bits : true } ) , "-8 Kb " , "Should be '-8 Kb '" ) ;
46+ test . equal ( filesize ( this . neg , { bits : true } ) , "-8 Kbit " , "Should be '-8 Kbit '" ) ;
47+ test . equal ( filesize ( this . neg , { round : 1 , bits : true } ) , "-8 Kbit " , "Should be '-8 Kbit '" ) ;
4848 test . equal ( filesize ( this . neg , { unix : true , bits : true } ) , "-8K" , "Should be '-8K'" ) ;
4949 test . equal ( filesize ( this . byte ) , "1 B" , "Should be '1 B'" ) ;
5050 test . equal ( filesize ( this . byte , { round : 1 } ) , "1 B" , "Should be '1 B'" ) ;
5151 test . equal ( filesize ( this . byte , { round : 1 , spacer : "" } ) , "1B" , "Should be '1B'" ) ;
5252 test . equal ( filesize ( this . byte , { unix : true } ) , "1" , "Should be '1'" ) ;
53- test . equal ( filesize ( this . byte , { bits : true } ) , "8 b " , "Should be '8 b '" ) ;
54- test . equal ( filesize ( this . byte , { round : 1 , bits : true } ) , "8 b " , "Should be '8 b '" ) ;
53+ test . equal ( filesize ( this . byte , { bits : true } ) , "8 bit " , "Should be '8 bit '" ) ;
54+ test . equal ( filesize ( this . byte , { round : 1 , bits : true } ) , "8 bit " , "Should be '8 bit '" ) ;
5555 test . equal ( filesize ( this . byte , { unix : true , bits : true } ) , "8" , "Should be '8'" ) ;
5656 test . equal ( filesize ( this . zero ) , "0 B" , "Should be '0 B'" ) ;
5757 test . equal ( filesize ( this . zero , { round : 1 } ) , "0 B" , "Should be '0 B'" ) ;
5858 test . equal ( filesize ( this . zero , { round : 1 , spacer : "" } ) , "0B" , "Should be '0B'" ) ;
5959 test . equal ( filesize ( this . zero , { unix : true } ) , "0" , "Should be '0'" ) ;
60- test . equal ( filesize ( this . zero , { bits : true } ) , "0 b " , "Should be '0 b '" ) ;
61- test . equal ( filesize ( this . zero , { round : 1 , bits : true } ) , "0 b " , "Should be '0 b '" ) ;
60+ test . equal ( filesize ( this . zero , { bits : true } ) , "0 bit " , "Should be '0 bit '" ) ;
61+ test . equal ( filesize ( this . zero , { round : 1 , bits : true } ) , "0 bit " , "Should be '0 bit '" ) ;
6262 test . equal ( filesize ( this . zero , { unix : true , bits : true } ) , "0" , "Should be '0'" ) ;
6363 test . equal ( filesize ( this . huge ) , "82718061255302770 YB" , "Should be '82718061255302770 YB'" ) ;
64- test . equal ( filesize ( this . huge , { bits : true } ) , "661744490042422100 Yb " , "Should be '661744490042422100 Yb '" ) ;
64+ test . equal ( filesize ( this . huge , { bits : true } ) , "661744490042422100 Ybit " , "Should be '661744490042422100 Ybit '" ) ;
6565 test . equal ( filesize ( this . small ) , "0 B" , "Should be '0 B'" ) ;
66- test . equal ( filesize ( this . small , { bits : true } ) , "1 b " , "Should be '1 b '" ) ;
66+ test . equal ( filesize ( this . small , { bits : true } ) , "1 bit " , "Should be '1 bit '" ) ;
6767 test . equal ( filesize ( this . petabyte ) , "1 PB" , "Should be '1 PB'" ) ;
6868 test . done ( ) ;
6969 } ,
@@ -74,36 +74,36 @@ exports.filesize = {
7474 test . equal ( filesize ( this . kilobit , { base : 10 , round : 1 } ) , "500 B" , "Should be '500 B'" ) ;
7575 test . equal ( filesize ( this . kilobit , { base : 10 , round : 1 , spacer : "" } ) , "500B" , "Should be '500B'" ) ;
7676 test . equal ( filesize ( this . kilobit , { base : 10 , unix : true } ) , "500" , "Should be '500'" ) ;
77- test . equal ( filesize ( this . kilobit , { base : 10 , bits : true } ) , "4 kb " , "Should be '4 kb '" ) ;
78- test . equal ( filesize ( this . kilobit , { base : 10 , round : 1 , bits : true } ) , "4 kb " , "Should be '4 kb '" ) ;
77+ test . equal ( filesize ( this . kilobit , { base : 10 , bits : true } ) , "4 kbit " , "Should be '4 kbit '" ) ;
78+ test . equal ( filesize ( this . kilobit , { base : 10 , round : 1 , bits : true } ) , "4 kbit " , "Should be '4 kbit '" ) ;
7979 test . equal ( filesize ( this . kilobit , { base : 10 , unix : true , bits : true } ) , "4k" , "Should be '4k'" ) ;
8080 test . equal ( filesize ( this . kilobyte , { base : 10 } ) , "1.02 kB" , "Should be '1.02 kB'" ) ;
8181 test . equal ( filesize ( this . kilobyte , { base : 10 , round : 1 } ) , "1 kB" , "Should be '1 kB'" ) ;
8282 test . equal ( filesize ( this . kilobyte , { base : 10 , round : 1 , spacer : "" } ) , "1kB" , "Should be '1kB'" ) ;
8383 test . equal ( filesize ( this . kilobyte , { base : 10 , unix : true } ) , "1k" , "Should be '1k'" ) ;
84- test . equal ( filesize ( this . kilobyte , { base : 10 , bits : true } ) , "8.19 kb " , "Should be '8.19 kb '" ) ;
85- test . equal ( filesize ( this . kilobyte , { base : 10 , round : 1 , bits : true } ) , "8.2 kb " , "Should be '8.2 kb '" ) ;
84+ test . equal ( filesize ( this . kilobyte , { base : 10 , bits : true } ) , "8.19 kbit " , "Should be '8.19 kbit '" ) ;
85+ test . equal ( filesize ( this . kilobyte , { base : 10 , round : 1 , bits : true } ) , "8.2 kbit " , "Should be '8.2 kbit '" ) ;
8686 test . equal ( filesize ( this . kilobyte , { base : 10 , unix : true , bits : true } ) , "8.2k" , "Should be '8.2k'" ) ;
8787 test . equal ( filesize ( this . neg , { base : 10 } ) , "-1.02 kB" , "Should be '-1.02 kB'" ) ;
8888 test . equal ( filesize ( this . neg , { base : 10 , round : 1 } ) , "-1 kB" , "Should be '-1 kB'" ) ;
8989 test . equal ( filesize ( this . neg , { base : 10 , round : 1 , spacer : "" } ) , "-1kB" , "Should be '-1kB'" ) ;
9090 test . equal ( filesize ( this . neg , { base : 10 , unix : true } ) , "-1k" , "Should be '-1k'" ) ;
91- test . equal ( filesize ( this . neg , { base : 10 , bits : true } ) , "-8.19 kb " , "Should be '-8.19 kb '" ) ;
92- test . equal ( filesize ( this . neg , { base : 10 , round : 1 , bits : true } ) , "-8.2 kb " , "Should be '-8.2 kb '" ) ;
91+ test . equal ( filesize ( this . neg , { base : 10 , bits : true } ) , "-8.19 kbit " , "Should be '-8.19 kbit '" ) ;
92+ test . equal ( filesize ( this . neg , { base : 10 , round : 1 , bits : true } ) , "-8.2 kbit " , "Should be '-8.2 kbit '" ) ;
9393 test . equal ( filesize ( this . neg , { base : 10 , unix : true , bits : true } ) , "-8.2k" , "Should be '-8.2k'" ) ;
9494 test . equal ( filesize ( this . byte , { base : 10 } ) , "1 B" , "Should be '1 B'" ) ;
9595 test . equal ( filesize ( this . byte , { base : 10 , round : 1 } ) , "1 B" , "Should be '1 B'" ) ;
9696 test . equal ( filesize ( this . byte , { base : 10 , round : 1 , spacer : "" } ) , "1B" , "Should be '1B'" ) ;
9797 test . equal ( filesize ( this . byte , { base : 10 , unix : true } ) , "1" , "Should be '1'" ) ;
98- test . equal ( filesize ( this . byte , { base : 10 , bits : true } ) , "8 b " , "Should be '8 b '" ) ;
99- test . equal ( filesize ( this . byte , { base : 10 , round : 1 , bits : true } ) , "8 b " , "Should be '8 b '" ) ;
98+ test . equal ( filesize ( this . byte , { base : 10 , bits : true } ) , "8 bit " , "Should be '8 bit '" ) ;
99+ test . equal ( filesize ( this . byte , { base : 10 , round : 1 , bits : true } ) , "8 bit " , "Should be '8 bit '" ) ;
100100 test . equal ( filesize ( this . byte , { base : 10 , unix : true , bits : true } ) , "8" , "Should be '8'" ) ;
101101 test . equal ( filesize ( this . zero , { base : 10 } ) , "0 B" , "Should be '0 B'" ) ;
102102 test . equal ( filesize ( this . zero , { base : 10 , round : 1 } ) , "0 B" , "Should be '0 B'" ) ;
103103 test . equal ( filesize ( this . zero , { base : 10 , round : 1 , spacer : "" } ) , "0B" , "Should be '0B'" ) ;
104104 test . equal ( filesize ( this . zero , { base : 10 , unix : true } ) , "0" , "Should be '0'" ) ;
105- test . equal ( filesize ( this . zero , { base : 10 , bits : true } ) , "0 b " , "Should be '0 b '" ) ;
106- test . equal ( filesize ( this . zero , { base : 10 , round : 1 , bits : true } ) , "0 b " , "Should be '0 b '" ) ;
105+ test . equal ( filesize ( this . zero , { base : 10 , bits : true } ) , "0 bit " , "Should be '0 bit '" ) ;
106+ test . equal ( filesize ( this . zero , { base : 10 , round : 1 , bits : true } ) , "0 bit " , "Should be '0 bit '" ) ;
107107 test . equal ( filesize ( this . zero , { base : 10 , unix : true , bits : true } ) , "0" , "Should be '0'" ) ;
108108 test . done ( ) ;
109109 } ,
@@ -128,9 +128,9 @@ exports.filesize = {
128128 } ,
129129 bits : function ( test ) {
130130 test . expect ( 3 ) ;
131- test . equal ( filesize ( 124 , { bits : true , base : 10 } ) , "992 b " , "Should be '992 b '" ) ;
132- test . equal ( filesize ( 125 , { bits : true , base : 10 } ) , "1 kb " , "Should be '1 kb '" ) ;
133- test . equal ( filesize ( 126 , { bits : true , base : 10 } ) , "1.01 kb " , "Should be '1.01 kb '" ) ;
131+ test . equal ( filesize ( 124 , { bits : true , base : 10 } ) , "992 bit " , "Should be '992 bit '" ) ;
132+ test . equal ( filesize ( 125 , { bits : true , base : 10 } ) , "1 kbit " , "Should be '1 kbit '" ) ;
133+ test . equal ( filesize ( 126 , { bits : true , base : 10 } ) , "1.01 kbit " , "Should be '1.01 kbit '" ) ;
134134 test . done ( ) ;
135135 } ,
136136 fullform : function ( test ) {
0 commit comments