Repository navigation
Use the public mixins in tests, not the internal copies - #21689
Merged
NullVoxPopuli merged 2 commits intoOct 10, 2026
Merged
NullVoxPopuli merged 2 commits into
NullVoxPopuli merged 2 commits into
Conversation
Tests imported the silent `-internal` copies of the deprecated mixins. Such a test stays after the deprecation is removed, and it keeps the internal copy in use. These tests now import the public mixin, expect its deprecation, and use `testUnless(...isRemoved)`. They go away with the deprecation. - `EmberArray` in `runtime/tests/mixins/array_test.js` - `MutableArray` in `glimmer/tests/integration/helpers/tracked-test.js` - `ContainerProxyMixin` in `container_proxy_test.js` - `TargetActionSupport` in `target_action_support_test.js` - `_ProxyMixin` in `ember/tests/service_injection_test.js` `TestArray#init` in `array_test.js` now calls `super.init`. Without that call, the deprecation of the mixin does not fire. Three tests in `array_test.js` do not use the mixin. They moved to their own module, so they still run after the removal. `mixin/deprecation_test.js` still imports `InternalMixin`. That test checks that the internal constructor does not fire the deprecation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NullVoxPopuli
approved these changes
Oct 10, 2026
A production build runs one assertion for all deprecation expectations of a test. A development build runs one assertion for each expectation. Two expectations made `assert.expect` fail in the production build jobs. Each test now has one expectation. Its pattern matches the mixin deprecation and the `triggerAction` deprecation. The `assert.expect` counts are back to their values on the base branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NullVoxPopuli
merged commit Oct 10, 2026
3ba8803
into
emberjs:nvp/deprecate-mixin-followups
70 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Tests in #21588 import the silent
-internalcopies of the deprecated mixins. This PR makes those tests use the public mixins.It follows the review comment in #21687 (comment).
The base is
nvp/deprecate-mixin-followups, the branch of #21588. The diff is one commit and 5 test files.What changed
Each test below now imports the public mixin, expects its deprecation, and uses
testUnless(...isRemoved). The tests go away with the deprecation.runtime/tests/mixins/array_test.jsEmberArrayglimmer/tests/integration/helpers/tracked-test.jsMutableArrayruntime/tests/mixins/container_proxy_test.jsContainerProxyMixinruntime/tests/mixins/target_action_support_test.jsTargetActionSupportember/tests/service_injection_test.js_ProxyMixinChanges that are not an import swap
TestArray#initinarray_test.jsnow callssuper.init. Without that call, theEmberArraydeprecation does not fire.array_test.jsdo not use the mixin. They moved to a new module,@each support, so they still run after the removal.assert.expectcounts went up by one in twoContainerProxyMixintests. The deprecation expectation adds one assertion.TargetActionSupporttest has one expectation. Its pattern matches the mixin deprecation and thetriggerActiondeprecation. A production build runs one assertion for all expectations of a test, so two expectations give different counts in the two builds.What stays
packages/@ember/object/tests/mixin/deprecation_test.jsstill importsInternalMixin. That test checks that the internal constructor does not fire the deprecation, so the internal copy is its subject.Open point
The three
ContainerProxyMixintests are the only tests ofownerInjectionon an owner and of the destruction order of an owner. After the removal they are skipped.EngineInstancestill uses that code.Test results
Full suite, local run:
ALL_DEPRECATIONS_ENABLED=trueOVERRIDE_DEPRECATION_VERSION=15.0.0🤖 Generated with Claude Code