import { act } from 'react-dom/test-utils' ; import { TestBed } from '@kbn/test/jest' ; export function createFormSetValueAction < V extends string = string > ( testBed , dataTestSubject ) { const { form , component } = testBed ; return async ( value ) => { await act ( async ( ) => { form . setInputValue ( dataTestSubject , value ) ; } ) ; component . update ( ) ; } ; }