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

Office-AddIn-Mock failed to mock getOfficeDisplayLanguage and build a project #850

Open
rosergeev opened this issue Apr 9, 2024 · 0 comments

Comments

@rosergeev
Copy link

Current behavior

I'm trying to mock Office.context.displayLanguage property, but without success. I've got the following error while accessing this property:
"error, property was not loaded". This is an output from console.log. I didn't get which property I should load and how?

And when I try to build project I've got ts2740 error saying that mock object doesn't implement members defined by Office namespace and which ain't used in fact.

Steps to Reproduce

https://codesandbox.io/p/devbox/officemock-rjtz6m?file=%2Fsrc%2FofficeService.test.ts%3A8%2C23

Context

  • Operating System: Windows 11, 22H2 22621.3296
  • Node version: v20.11.1

Just execute npm run test in repro

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

No branches or pull requests

1 participant