import { act } from '@testing-library/react' ; import React from 'react' ; import { mountWithIntl } from '@kbn/test/jest' ; import { SpaceAvatarInternal } from '../../../space_avatar/space_avatar_internal' ; import { AdvancedSettingsTitle } from './advanced_settings_title' ; describe ( 'AdvancedSettingsTitle' , ( ) => { it ( 'renders without crashing' , async ( ) => { const space = { id : 'my-space' , name : 'My Space' , disabledFeatures : [ ] , } ; const wrapper = mountWithIntl ( < AdvancedSettingsTitle getActiveSpace = { ( ) => Promise . resolve ( space ) } />); await act ( async ( ) => { } ) ; await act ( async ( ) => { } ) ; wrapper . update ( ) ; expect ( wrapper . find ( SpaceAvatarInternal ) ) . toHaveLength ( 1 ) ; } ) ; } ) ;