import { EuiCallOut } from '@elastic/eui' ; import { act } from '@testing-library/react' ; import React from 'react' ; import { mountWithIntl , nextTick } from '@kbn/test/jest' ; import { AdvancedSettingsSubtitle } from './advanced_settings_subtitle' ; describe ( 'AdvancedSettingsSubtitle' , ( ) => { it ( 'renders as expected' , async ( ) => { const space = { id : 'my-space' , name : 'My Space' , disabledFeatures : [ ] , } ; const wrapper = mountWithIntl ( < AdvancedSettingsSubtitle getActiveSpace = { ( ) => Promise . resolve ( space ) } />); await act ( async ( ) => { await nextTick ( ) ; wrapper . update ( ) ; } ) ; expect ( wrapper . find ( EuiCallOut ) ) . toHaveLength ( 1 ) ; } ) ; } ) ;