import React from 'react' ; import { shallow } from 'enzyme' ; import { EuiLoadingSpinner , EuiTextColor } from '@elastic/eui' ; import { ComponentLoader } from './' ; describe ( 'ComponentLoader' , ( ) => { it ( 'renders' , ( ) => { const wrapper = shallow ( < ComponentLoader />); expect ( wrapper . find ( EuiLoadingSpinner ) ) . toHaveLength ( 1 ) ; expect ( wrapper . find ( EuiTextColor ) ) . toHaveLength ( 1 ) ; expect ( wrapper . find ( EuiTextColor ) . prop ( 'children' ) ) . toEqual ( 'Loading...' ) ; } ) ; } ) ;