{{ message }}
test(devtools): run the orphaned supported-apis spec - #70570
Merged
Conversation
hawkgs
reviewed
Sep 4, 2026
`supported-apis.spec.ts` was added in angular#60585, in a commit that also edited the `ts_test_library` three lines below the `srcs` it was left out of. No revision of that BUILD file has ever listed it, so it has not run since March 2025. The target goes from 12 specs to 14. Wiring it up alone would not have worked. Every `*IsSupported` helper calls `ngDebugClient()`, which throws when `window.ng` is undefined, and the old `expect(supported).toBeTruthy()` set no `ng` at all. It now stubs `ng` and checks the flag set and that each flag tracks its own debug API. `ng-debug-api.spec.ts` adds an `[ng-version]` root and did not remove it, which `getAppRoots()` then picks up in the other file under jasmine's random ordering, so it now clears the DOM in its own `afterEach`. `glob` matches the sibling `directive-forest/component-tree` target and keeps the next spec in this directory from being dropped the same way.
erkamyaman
force-pushed
the
run-supported-apis-spec
branch
from
September 4, 2026 10:35
d1c4ce7 to
26d7318
Compare
Contributor
Author
Contributor
Author
|
One more thing I noticed while working on this. devtools/projects/shell-browser/src/app/app.component.spec.ts has the same problem: there is no test target for it at all, so it has never run either. That folder has three spec files and only two of them are wired up. I already have a fix working for it locally. I can send it as a follow-up PR if that is useful. @hawkgs |
Member
|
We would definitely want to have a working test. 👍 Doesn't make sense to just keep a spec file. |
Member
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.

supported-apis.spec.tswas added in #60585, in a commit that also edited thets_test_librarythree lines below thesrcsit was left out of. No revision of that BUILD file has ever listed it, so it has not run since March 2025. The target goes from 12 specs to 14.Wiring it up alone would not have worked. Every
*IsSupportedhelper callsngDebugClient(), which throws whenwindow.ngis undefined, and the oldexpect(supported).toBeTruthy()set nongat all. It now stubsngand checks the flag set and that each flag tracks its own debug API.The
beforeEachclears the DOM becauseng-debug-api.spec.tsleaves an[ng-version]root behind forgetAppRoots()to find under jasmine's random ordering.globmatches the siblingdirective-forest/component-treetarget and keeps the next spec in this directory from being dropped the same way.