Skip to content

Conversation

@MSNev
Copy link
Collaborator

@MSNev MSNev commented Dec 2, 2025

No description provided.

@MSNev MSNev requested a review from a team as a code owner December 2, 2025 21:36
Copilot AI review requested due to automatic review settings December 2, 2025 21:36
@MSNev MSNev enabled auto-merge (squash) December 2, 2025 21:36
Copy link
Contributor

Copilot AI left a comment

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 fixes a flaky Ajax test that had race conditions by migrating from external httpbin.org endpoints to local test server (localhost:9001) and implementing proper promise-based wait patterns for asynchronous XHR operations.

Key Changes

  • Replaced all httpbin.org test URLs with localhost:9001/shared/ to eliminate external dependencies
  • Added promise-based completion handlers for XHR requests to properly wait for request lifecycle completion before assertions
  • Fixed typos in assertion messages (e.g., "Check first traceId" → "Check second traceId")
  • Added proper cleanup with appInsightsCore.unload(false) in test teardown via onDone() callbacks

Reviewed changes

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

File Description
ajax.tests.ts Replaced external test endpoints with localhost, added promise-based XHR completion handling to fix race conditions, corrected test assertion messages, added cleanup handlers, and fixed ExcludeRequestRegex pattern to match new localhost URLs
npm-shrinkwrap.json Updated various npm package dependencies (automated lockfile updates)
Files not reviewed (1)
  • common/config/rush/npm-shrinkwrap.json: Language not supported

@MSNev MSNev merged commit 6ef6d33 into main Dec 2, 2025
15 checks passed
@MSNev MSNev deleted the MSNev/FixAjaxTests branch December 2, 2025 22:44
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