ember.js
ember.js copied to clipboard
Add private utility API that enables `ember-qunit` to detect leaking an Owner instance
This PR introduces a simple internal utility API that can be leveraged by ember-qunit and @ember/test-helpers to allow applications to more easily detect memory leaks within their application.
Example of running a test that intentionally holds on to the owner instance (e.g. "bad test"):

@rwjblue is there any particular reason this shouldn't be made public API instead of intimate?
@rwjblue is there any particular reason this shouldn't be made public API instead of intimate?
@mixonic - Nope. I'd love for it to be a public API (though someone else can write the RFC :P ), but I figured it would be easier (and non-controversial) to land as private API initially (while we flesh out the ember-qunit and @ember/test-helpers parts of the consumption).
Is this still relevant? It is a draft PR
It is definitely still relevant in principle, but neither Rob nor I are driving it from the LinkedIn side (as I am not there and he is focused on totally different things now!) and it is exceedingly unlikely anyone else at LinkedIn is going to be able to land it at this point, unfortunately. Having this as part of both Ember’s own test suite and readily available for apps and addons would be invaluable to the ecosystem in my view, though, as leaked Owners are one of the easiest ways to end up with very bad memory issues in either tests or FastBoot.
Read the code, Not sure I see any outstanding issues with it. Thus, what are the current blockers to moving this from draft to ready for review?
Someone to take ownership of it, for one; and someone to actually write tests for this for another. 😅