Last active
September 21, 2020 12:19
-
-
Save ivange94/241f16e660d5f121cc2468c4789f7a53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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