File tree Expand file tree Collapse file tree
x-pack/legacy/plugins/siem/public/components/formatted_bytes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,11 +25,11 @@ describe('PreferenceFormattedBytes', () => {
2525 expect ( toJson ( wrapper ) ) . toMatchSnapshot ( ) ;
2626 } ) ;
2727
28- test ( 'it renders bytes to hardcoded format when no configuration exists' , ( ) => {
28+ test ( 'it renders bytes to Numeral formatting when no format setting exists' , ( ) => {
2929 mockUseUiSetting$ . mockImplementation ( ( ) => [ null ] ) ;
3030 const wrapper = mount ( < PreferenceFormattedBytesComponent value = { bytes } /> ) ;
3131
32- expect ( wrapper . text ( ) ) . toEqual ( '2.7MB ' ) ;
32+ expect ( wrapper . text ( ) ) . toEqual ( '2,806,422 ' ) ;
3333 } ) ;
3434
3535 test ( 'it renders bytes according to the default format' , ( ) => {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { useUiSetting$ } from '../../lib/kibana';
1212
1313export const PreferenceFormattedBytesComponent = ( { value } : { value : string | number } ) => {
1414 const [ bytesFormat ] = useUiSetting$ < string > ( DEFAULT_BYTES_FORMAT ) ;
15- return < > { numeral ( value ) . format ( bytesFormat || '0,0.[0]b' ) } </ > ;
15+ return < > { numeral ( value ) . format ( bytesFormat ) } </ > ;
1616} ;
1717
1818PreferenceFormattedBytesComponent . displayName = 'PreferenceFormattedBytesComponent' ;
You can’t perform that action at this time.
0 commit comments