Skip to content

Improve test failure handling - #216

Open
millerds wants to merge 6 commits into
masterfrom
user/millerds/improve-test-failure-handling
Open

Improve test failure handling#216
millerds wants to merge 6 commits into
masterfrom
user/millerds/improve-test-failure-handling

Conversation

@millerds

Copy link
Copy Markdown
Contributor

Change Description:
Update .npmrc to use a compliant registry feed
Also include some package and tests updates.

  1. Do these changes impact any npm scripts commands (in package.json)? (e.g., running 'npm run start')
    No.

  2. Do these changes impact VS Code debugging options (launch.json)?
    No.

  3. Do these changes impact template output? (e.g., add/remove file, update file location, update file contents)
    No.

  4. 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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  • request appears to be unused (the only usage was removed from test/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.

Comment thread test/end-to-end/tests.ts Outdated
Comment thread test/end-to-end/tests.ts
Comment thread test/end-to-end/src/test-helpers.ts
Comment thread README.md
Comment thread package.json
millerds and others added 2 commits July 27, 2026 11:30
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Rick-Kirkham
Rick-Kirkham previously approved these changes Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants