OfficeDev / OfficeDev/Office-Addin-Scripts
office-addin-mock compatible in browser
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 194
- Forks
- 117
- Avg merge
- 1d 32m
- Merged PRs (30d)
- 2
Description
I’m reaching out for guidance on an issue I’ve encountered while running Excel add-in unit tests using office-addin-mock. My test suite attempts to execute these tests in the browser, as that’s where my add-in functions are executed. However, I’m encountering Node-related dependency errors that aren’t resolved even with vite-plugin-node-polyfills.
Could you clarify why office-addin-mock requires Node.js dependencies, particularly for objects in the browser environment? After reviewing the library, it appears that much of the Node dependency originates from office-addin-usage-data, which is required by office-addin-mock. If this dependency—and its associated data collection functionality—are essential, it imposes a significant restriction on running these tests purely in the browser. This limitation creates an unsatisfactory experience for developers attempting to conduct browser-based testing for Office add-ins.
Any insights on this matter would be greatly appreciated, as this dependency affects the overall user experience and ease of development within the Office add-in ecosystem.
Thank you for your time and attention.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the dependency relationship between office-addin-mock and office-addin-usage-data, then reproduce the browser test setup described with Vite and vite-plugin-node-polyfills. Determine which Node.js dependencies are required by the mock objects and whether browser-compatible usage is feasible. Done means either browser tests run without Node-related errors or the limitation and required changes are clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript, vite
- Domain
- developer-experience, testing-qa, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100