import { registerTestBed , AsyncTestBedConfig } from '@kbn/test/jest' ; import { PolicyEdit } from '../../../public/application/sections/policy_edit' ; import { WithAppDependencies } from './setup_environment' ; import { POLICY_NAME } from './constant' ; import { formSetup , PolicyFormTestSubjects } from './policy_form.helpers' ; const testBedConfig = { memoryRouter : { initialEntries : [ `/edit_policy/${ POLICY_NAME }` ] , componentRoutePath : '/edit_policy/:name' , } , doMountAsync : true , } ; const initTestBed = registerTestBed < PolicyFormTestSubjects > ( WithAppDependencies ( PolicyEdit ) , testBedConfig ) ; export const setup = formSetup . bind ( null , initTestBed ) ;