Add Support For Mocking New viewChild Function (Fix (reading 'Symbol(SIGNAL)') error)#12875
Merged
satanTime merged 2 commits intoFeb 3, 2026
Conversation
viewChild Function (Fix (reading 'Symbol(SIGNAL)') error)
viewChild Function (Fix (reading 'Symbol(SIGNAL)') error)viewChild Function (Fix (reading 'Symbol(SIGNAL)') error)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #12875 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 228 228
Lines 4988 4987 -1
Branches 1158 1159 +1
=========================================
- Hits 4988 4987 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
I'm getting a similar error to before on my "0.0.3" patch that wasn't happening on "0.0.1". Taking a closer look.
|
ViewChild will always be null, and so there is no point in mocking it. viewChild.required throws an error in mocked components without this change. Fixes help-me-momGH-8634 Co-Authored-By: c-harding <c-harding@users.noreply.github.com>
21e783c to
bfadde7
Compare
|
@Watercycle I plopped 0.03 into our app moments ago, and it works like a champ - thanks! |
Contributor
Author
|
Ah, I failed to update my fork's |
This was referenced Jan 31, 2026
satanTime
approved these changes
Feb 2, 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.
Summary
Fixes #8634
As a follow-up to #11909, this PR duplicates #8771, which improves Angular 19 compatibility by hiding
viewChildand friends from the mock component metadata. The original PR seems to have gotten stuck in CI purgatory. Full credits to c-harding - this solution seems to work as expected so I'm just offering to shepherd it through CI.Testing
package.jsonas:npm install.ng-mocksdoes not.