import { act } from 'react-dom/test-utils' ; import { TestBed } from '@kbn/test/jest' ; export const createSavePolicyAction = ( testBed ) => async ( ) => { const { find , component } = testBed ; await act ( async ( ) => { find ( 'savePolicyButton' ) . simulate ( 'click' ) ; } ) ; component . update ( ) ; } ;