Skip to content

Update tests to handle more failures.#241

Merged
Rick-Kirkham merged 4 commits into
masterfrom
user/millerds/improve-test-failure-handling
Jul 20, 2026
Merged

Update tests to handle more failures.#241
Rick-Kirkham merged 4 commits into
masterfrom
user/millerds/improve-test-failure-handling

Conversation

@millerds

Copy link
Copy Markdown
Contributor

Change Description:
Update end-to-end test code to handle failures beyond the APIs returning the wrong values. This includes catching exceptions in running the tests and running the APIs themselves.

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

@millerds
millerds requested a review from a team as a code owner July 17, 2026 22:42
Rick-Kirkham
Rick-Kirkham previously approved these changes Jul 18, 2026

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 end-to-end testing harness to surface and fail on a broader set of failures (timeouts, initialization errors, and host-run exceptions) by sending structured error results back to the test runner.

Changes:

  • Add a timeout around retrieving test results and fail fast when the taskpane never reports results.
  • Report initialization/ping failures and host-run exceptions via a dedicated "test-error" result and improved error formatting.
  • Update TypeScript compiler settings and npm registry configuration (note: these are outside the PR’s stated test-only scope).

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tsconfig.json Updates TS compilation settings; also currently includes an invalid trailing comma and changes outside the PR’s stated scope.
test/end-to-end/ui-test.ts Adds result timeout handling and fails tests when a "test-error" result is reported.
test/end-to-end/src/test.index.tsx Catches initialization/ping failures and posts error results back to the test server.
test/end-to-end/src/test-helpers.ts Adds helpers for structured error results and consistent error formatting.
test/end-to-end/src/host-tests.ts Ensures host-run calls are awaited and reports exceptions as "test-error" results.
.npmrc Switches npm registry to an internal proxy (impacts installs/runs).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .npmrc
Comment thread test/end-to-end/src/test.index.tsx
Rick-Kirkham
Rick-Kirkham previously approved these changes Jul 20, 2026
@millerds

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflict by merging latest master into this branch and committing the fix in 5951a8d.

@Rick-Kirkham
Rick-Kirkham merged commit 4cffefe into master Jul 20, 2026
5 checks passed
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.

4 participants