Repository navigation
Use native and tracked arrays in tests that are not about Ember arrays - #21690
Merged
NullVoxPopuli merged 1 commit intoOct 11, 2026
Merged
Conversation
Many tests call `A()` from `@ember/array` only for historical reasons. RFC 1114 deprecates `A()`, so each such test would need a deprecation expectation and a removal guard, and its coverage would go away with `A()`. These tests now use a native array, or `trackedArray` when the test changes the array in place. The assertions are the same. - Rendering tests: positional params, curly components, life cycle, `link-to`, `let`, `if`, `unbound`. - Application tests: route models and query param values. - `ArrayProxy` tests where the content does not need Ember array methods. - `it considers empty arrays falsy` has a native array version and an Ember array version. - `observable_test.js` makes the Ember array in the one test that needs it. Tests about Ember arrays do not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 10, 2026
ef4
approved these changes
Oct 11, 2026
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 that are not about Ember arrays stop using
A()from@ember/array. Only test files change.Why this is a separate PR
#21687 deprecates
A()(RFC 1114). In review of that PR, @ef4 said that a test must do one of two things:A(), expects the deprecation, and has a guard, so the test goes away withA().trackedArray.Most tests that call
A()are in the second group. They useA()only for historical reasons. This PR moves that group, and it has no dependency on the deprecation, so it can merge first.#21687 has this same change as its first commit. After this PR merges, that commit drops out of #21687, and #21687 shows only the deprecation.
Changes
A test uses a native array if it replaces the array, and
trackedArrayif it changes the array in place. The assertions are the same.link-to,let,if,unbound.ArrayProxytests where the content does not need Ember array methods (isArray,isEmpty, content listeners).each: an Ember array that goes throughA()again is the same array, so the second call is gone.Two tests change shape:
it considers empty arrays falsyused Ember arrays. It is now a native array test, andit considers empty Ember arrays falsykeeps the old body.observable_test.jsmade an Ember array inbeforeEachfor a full module. Onlyshould notify array observer when array changesneeds it, so that test makes it.Not in this PR
Tests about Ember arrays do not change: the array suites, the
ArrayProxysuites, the array macro tests, the Ember array cases ofeachand of the conditionals, and the tests of[]and@eachchains. #21687 adds the deprecation expectations and guards to those.Test results
Local runs of the full suite on this branch:
🤖 Generated with Claude Code