Unit test cases for Office js library using Angular13 framework
We are developing outlook add-in using Angular 13 framework and trying to write unit test cases for it.
We have tried and tested the examples which is mentioned in official documentation.
Unable to execute test cases using Jest/Jasmine framework due to the Office JS as we are creating mock data for Office JS library.
Facing issues like:
Error: "The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment."
And if we set the test environment to jsdom, we get the error as mentioned below:
Error: "The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "node" test environment." and vice-versa
Is there any solution to resolve this issue?