Setup basic infrastructure to ensure destroyables destroyed #19787
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
@glimmer/destroyables
package (which is re-exported here as@ember/destroyable
) provides a handy utility that we can use to ensure that all objects that were setup with the destruction system have actually haddestroy
called on them. Read up over in emberjs/rfcs#580 for details on theenableDestroyableTracking
andassertDestroyablesDestroyed
methods (or destroyables in general).This PR adds the basic ability to begin enforcing that our own test suite properly calls
destroy
on everything that has a destructor setup on it, this is a basic precursor to exposing the same utility to application test harnesses. At the moment, applications cannot leverage theassertDestroyablesDestroyed
functionality themselves, due to framework objects themselves. This PR allows us to begin fixing that...References