import { TransformedData , IFormField } from '@client/forms' ; import { birthEventLocationMutationTransformer } from './child-mappings' ; describe ( 'Child section mutation mapping related tests' , ( ) => { it ( 'Test birthLocation search field' , ( ) => { const transformedData = { child : { } } ; const draftData = { child : { birthLocation : '54538456-fcf6-4276-86ac-122a7eb47703' } } ; birthEventLocationMutationTransformer ( 0 ) ( transformedData , draftData , 'child' , { name : 'birthLocation' , type : 'LOCATION_SEARCH_INPUT' } as IFormField ) ; expect ( transformedData . child ) . toBeDefined ( ) ; expect ( transformedData . eventLocation . _fhirID ) . toEqual ( '54538456-fcf6-4276-86ac-122a7eb47703' ) ; } ) ; } ) ;