Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
romangobrey opened this issue Mar 9, 2023 · 0 comments
Open

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

romangobrey opened this issue Mar 9, 2023 · 0 comments

Comments

@romangobrey
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant