xrm-mock
xrm-mock copied to clipboard
Testing onChange event with async code
Hello,
I'm starting to use this for unit testing my front end code, so I need some help moving forward.
I have a Date
attribute that will make an Xrm.WebApi.retrieveMultipleRecords
call on the onChange
handler. I saw the code sample on how to use sinon to mock the call, but it is sill async and I can't await it since fireOnChange
is not "awaitable" (AFAIK).
Please point me in the right direction if there's any techniques or design patterns I'm missing. Thanks in advace