[Regression][v9] adding stubs to child components causes child component "@Output" removal
See original GitHub issueAfter upgrading to version 9 of shallow-render and Angular, using shallow.mock()
to add child component instance properties causes @Output fooChange not initialized in 'MockOfFooComponent'
error. Without calling shallow.mock()
component is initialized correctly with child component outputs.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Why does removing and newly adding a child component ...
When the criterias in the parent component change and the list of items is loaded again, the child component fails with this error...
Read more >Mock method in stubbed child component · Issue #1570 - GitHub
Problem. I have a ParentComponent which fires a method on a ChildComponent by using the $refs property. However, in testing when I shallowMount ......
Read more >Towards Better Testing In Angular. Part 1 — Mocking Child ...
Add the child component to declarations array; Use NO_ERRORS_SCHEMA to ignore the child component; Manually mock/stub the child component ...
Read more >Testing Components with children - Testing Angular
An integration test of HomeComponent renders the child Components. The host elements are filled with the output of CounterComponent ...
Read more >Sharing data between child and parent directives ... - Angular
A common pattern in Angular is sharing data between a parent component and one or more child components. Implement this pattern with the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, I’ll make a PR with a fix and a unit test soon. Thank you very much for making this awesome library 😃
Yes, it’s working well now. Thanks for fixing the issue.