@@ -6,25 +6,25 @@ describe('should not throw error on empty config', () => {
66describe ( 'when the value is invalid with default config' , ( ) => {
77 const numberFormat = new NumberFormat ( { } )
88 it ( 'should return as follows' , ( ) => {
9- expect ( numberFormat . format ( '' ) ) . toEqual ( 0 )
10- expect ( numberFormat . format ( 'foo' ) ) . toEqual ( 0 )
11- expect ( numberFormat . format ( '-foo' ) ) . toEqual ( 0 )
12- expect ( numberFormat . format ( '-fo,o-' ) ) . toEqual ( 0 )
13- expect ( numberFormat . format ( '!@#$%^&*()' ) ) . toEqual ( 0 )
9+ expect ( numberFormat . format ( '' ) ) . toEqual ( '' )
10+ expect ( numberFormat . format ( 'foo' ) ) . toEqual ( '' )
11+ expect ( numberFormat . format ( '-foo' ) ) . toEqual ( '' )
12+ expect ( numberFormat . format ( '-fo,o-' ) ) . toEqual ( '' )
13+ expect ( numberFormat . format ( '!@#$%^&*()' ) ) . toEqual ( '' )
1414 } )
1515 it ( 'should return as follows' , ( ) => {
16- expect ( numberFormat . clean ( ) . format ( '' ) ) . toEqual ( 0 )
17- expect ( numberFormat . clean ( ) . format ( 'foo' ) ) . toEqual ( 0 )
18- expect ( numberFormat . clean ( ) . format ( '-foo' ) ) . toEqual ( 0 )
19- expect ( numberFormat . clean ( ) . format ( '-fo,o-' ) ) . toEqual ( 0 )
20- expect ( numberFormat . clean ( ) . format ( '!@#$%^&*()' ) ) . toEqual ( 0 )
16+ expect ( numberFormat . clean ( ) . format ( '' ) ) . toEqual ( '' )
17+ expect ( numberFormat . clean ( ) . format ( 'foo' ) ) . toEqual ( '' )
18+ expect ( numberFormat . clean ( ) . format ( '-foo' ) ) . toEqual ( '' )
19+ expect ( numberFormat . clean ( ) . format ( '-fo,o-' ) ) . toEqual ( '' )
20+ expect ( numberFormat . clean ( ) . format ( '!@#$%^&*()' ) ) . toEqual ( '' )
2121 } )
2222 it ( 'should return as follows' , ( ) => {
23- expect ( numberFormat . unformat ( '' ) ) . toEqual ( 0 )
24- expect ( numberFormat . unformat ( 'foo' ) ) . toEqual ( 0 )
25- expect ( numberFormat . unformat ( '-foo' ) ) . toEqual ( 0 )
26- expect ( numberFormat . unformat ( '-fo,o-' ) ) . toEqual ( 0 )
27- expect ( numberFormat . unformat ( '!@#$%^&*()' ) ) . toEqual ( 0 )
23+ expect ( numberFormat . unformat ( '' ) ) . toEqual ( '' )
24+ expect ( numberFormat . unformat ( 'foo' ) ) . toEqual ( '' )
25+ expect ( numberFormat . unformat ( '-foo' ) ) . toEqual ( '' )
26+ expect ( numberFormat . unformat ( '-fo,o-' ) ) . toEqual ( '' )
27+ expect ( numberFormat . unformat ( '!@#$%^&*()' ) ) . toEqual ( '' )
2828 } )
2929} )
3030describe ( 'format when options are default' , ( ) => {
0 commit comments