Skip to content

Instantly share code, notes, and snippets.

@ivange94
Last active September 21, 2020 12:19
Show Gist options
  • Save ivange94/241f16e660d5f121cc2468c4789f7a53 to your computer and use it in GitHub Desktop.
Save ivange94/241f16e660d5f121cc2468c4789f7a53 to your computer and use it in GitHub Desktop.
import * as mockOpenmrsModuleConfig from '../../__mocks__/openmrs-esm-module-config.mock';
let mockOpenmrsConfig = {
persontAttributeSections: [
{
name: 'additionalPersonAttributesSectionHeader',
personAttributes: [
{
name: 'telephoneNumber',
label: 'phoneNumber',
uuid: '14d4f066-15f5-102d-96e4-000c29c2a5d7',
placeholder: 'phoneNumberPlaceHolder',
validation: { required: true, matches: '^[0-9]*$' },
},
],
},
]
}
// Then added inside the form submit test block
beforeAll(() => {
spyOn(mockOpenmrsModuleConfig, 'useConfig').and.returnValue(mockOpenmrsConfig);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment