camelCaseDave / xrm-mock

:books: A fake implementation of the Xrm object model. Written in TypeScript against @types/xrm definitions.
MIT License
79 stars 31 forks source link

use xrm-mock for Xrm v8 and v9 in one project #89

Open romangobrey opened 1 year ago

romangobrey commented 1 year ago

Hi,

Our app targets Dynamics v8, so we have bunch of tests for v8 At the same time we plan to migrate to v9, so in parallel we update the code and write tests against v9

We use aliases to add both xrm types (v8 and v9)

"@types/xrm8": "npm:@types/xrm@^8.2.8",
"@types/xrm9": "npm:@types/xrm@^9.0.70"

When initializing fake Xrm using XrmMockGenerator.initialize() clientContext in ContextMock can't be created via ClientContextMock because this mock object does not implement "isNetworkAvailable" property Targeting just "@types/xrm8": "npm:@types/xrm@^8.2.8" because Xrm.Static does not have this "isNetworkAvailable" property in earlier version

image

image

Thank you!