import React from 'react' ; import { shallow } from 'enzyme' ; import { EuiText , EuiSpacer } from '@elastic/eui' ; import { RoleOptionLabel } from './role_option_label' ; describe ( 'RoleOptionLabel' , ( ) => { it ( 'renders with capitalized label ' , ( ) => { const wrapper = shallow ( < RoleOptionLabel label = "foO" description = "bar" / > ) ; expect ( wrapper . find ( EuiText ) ) . toHaveLength ( 2 ) ; expect ( wrapper . find ( EuiText ) . first ( ) . prop ( 'children' ) ) . toBe ( 'Foo' ) ; expect ( wrapper . find ( EuiSpacer ) ) . toHaveLength ( 2 ) ; } ) ; } ) ;