Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EmberApplicationInstance willDestroy in settled.ts uses the wrong internalPendingRequests #1172

Closed
raycohen opened this issue Dec 1, 2021 · 0 comments · Fixed by #1173
Closed

Comments

@raycohen
Copy link
Contributor

raycohen commented Dec 1, 2021

upon updating ember-test-helpers, I have test code that resets the app hit the app instance willDestroy method, which errors on internalPendingRequests.clearPendingRequests() because internalPendingRequests is the (nonzero) integer result of calling the pendingRequests method.

Here's where the pendingRequests method is chained on the require that prevents accessing the other methods:

return loader.require('ember-testing/lib/test/pending_requests')
.pendingRequests;

error occurs here:

internalPendingRequests.clearPendingRequests();

likewise the off calls are passing undefined since internalPendingRequests is an integer and not a module

If you look at the deleted code in #1047 it was not chaining pendingRequests on the old require('ember-testing/lib/test/pending_requests') which allowed accessing the different methods from that module.

Is a PR welcome here?

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 a pull request may close this issue.

1 participant