question

SK-6787 avatar image
0 Votes"
SK-6787 asked

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?


office-outlook-itprooffice-addins-devoffice-js-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers