Skip to content

Remove pendingRequests check from ember-testing internal API#1561

Merged
kategengler merged 1 commit into
masterfrom
copilot/remove-check-pending-requests
Mar 28, 2026
Merged

Remove pendingRequests check from ember-testing internal API#1561
kategengler merged 1 commit into
masterfrom
copilot/remove-check-pending-requests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 28, 2026

settled.ts was summing request counts from two sources: locally-tracked jQuery AJAX hooks and ember-testing/lib/test/pending_requests (a private internal API). This removes the dependency on the latter.

Changes

  • addon/src/settled.ts: Remove import of pendingRequests from ember-testing/lib/test/pending_requests; simplify pendingRequests() to return only the local jQuery-tracked request count
-import { pendingRequests as _internalGetPendingRequestsCount } from 'ember-testing/lib/test/pending_requests';

 function pendingRequests() {
-  const localRequestsPending = requests !== undefined ? requests.length : 0;
-  const internalRequestsPending = _internalGetPendingRequestsCount();
-  return localRequestsPending + internalRequestsPending;
+  return requests !== undefined ? requests.length : 0;
 }

@kategengler
Copy link
Copy Markdown
Member

I have checked and even back in ember-source 4.0.0 this was no longer being incremented or decremented in ember-source, so this is safe to remove in a point release here.

@kategengler kategengler merged commit 75ffe3f into master Mar 28, 2026
24 of 25 checks passed
@kategengler kategengler deleted the copilot/remove-check-pending-requests branch March 28, 2026 01:30
@github-actions github-actions Bot mentioned this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants