Improve test failure handling - #216
Open
millerds wants to merge 6 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s npm registry configuration and improves TypeScript-based test execution and end-to-end test failure/timeout handling to make failures more diagnosable.
Changes:
- Switched the repo npm registry to an Azure Artifacts feed (
.npmrc) and documented authentication steps in the README. - Consolidated TypeScript test configuration and ts-node registration (new
test/register-ts-node.js, updated mocha scripts and VS Code launch configs). - Enhanced end-to-end tests with explicit timeouts and error propagation from the taskpane, plus minor test robustness improvements (websocket connection checks, request→fetch).
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
tsconfig.json |
Makes the root TS config extend the test TS config and only include test sources. |
test/tsconfig.json |
Modernizes TS compiler options for tests (strict, node16 module resolution, noEmit, mocha/node/office types). |
test/register-ts-node.js |
Centralizes ts-node registration to ensure the intended test/tsconfig.json is used. |
package.json |
Updates devDependencies and changes mocha commands to use the custom ts-node registration file. |
.vscode/launch.json |
Aligns VS Code mocha debug runs with the new ts-node registration. |
.npmrc |
Switches npm registry to a compliant feed and enables always-auth. |
README.md |
Adds registry authentication instructions. |
test/unit/excel.test.ts |
Tightens typings for the Excel mock context and global assignment style. |
test/end-to-end/tests.ts |
Adds explicit timeout/error handling while waiting for taskpane test results; improves websocket safety. |
test/end-to-end/src/test-taskpane.ts |
Sends richer error details back to the test server on initialization/failure paths. |
test/end-to-end/src/test-helpers.ts |
Adds helper utilities for error reporting/formatting. |
test/end-to-end/src/debugger-websocket.ts |
Replaces request usage with fetch and adds a short timeout for debugger endpoint polling. |
test/end-to-end/webpack.config.js |
Removes fs/os fallbacks from the end-to-end bundling config. |
Comments suppressed due to low confidence (1)
package.json:68
requestappears to be unused (the only usage was removed fromtest/end-to-end/src/debugger-websocket.ts, and there are no other imports/requires). Consider removing it to reduce dependency footprint.
"process": "^0.11.10",
"request": "^2.88.2",
"source-map-loader": "^5.0.0",
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Rick-Kirkham
previously approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Description:
Update .npmrc to use a compliant registry feed
Also include some package and tests updates.
Do these changes impact any npm scripts commands (in package.json)? (e.g., running 'npm run start')
No.
Do these changes impact VS Code debugging options (launch.json)?
No.
Do these changes impact template output? (e.g., add/remove file, update file location, update file contents)
No.
Do these changes impact documentation? (e.g., a tutorial on https://docs.microsoft.com/en-us/office/dev/add-ins/overview/office-add-ins)
No.
If you answered yes to any of these please do the following:
> Include 'Rick-Kirkham' in the review
> Make sure the README file is correct
Validation/testing performed:
Ran automated tests