Mocking useMedplumProfile
# support
c
Is there an easy way to mock the profile that is returned by the useMedplumProfile react hook? I don't see anything in the docs on this topic.
r
good question - I'm assuming to you need to use a ProfileResource that is a Patient or Practitioner as part of a test? Would it work to use of of the Mock Patients or practitioners? https://www.medplum.com/docs/api/fhir/medplum/projectmembership
c
No, I need to change what profile is returned by that hook for various test scenarios
r
Looking into this!
Short story here is that we don't have a great story for this at the moment and there would probably be some ugliness in getting it to work with the current mockClient. Can I ask you to describe the scenario you want to test and I'll get it filed?
154 Views