"not a known element" errors with shallow-render 8.2.0 when defining in "entryComponents"
See original GitHub issueAfter updating my project to Angular 8 I updated shallow-render to 8.2.2. After doing so my tests fail, both with an unknown element error:
Simply from my app module that imports an app routing module (which itself imports RouterModule
):
1. If 'router-outlet' is an Angular component, then verify that it is part of this module.
Error: Template parse errors:
'router-outlet' is not a known element:
This is from a component that uses the PrimeNG library (where ‘p-table’ comes from):
1. If 'p-table' is an Angular component and it has 'columns' input, then verify that it is part of this module.
2. If 'p-table' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
In both of these cases there is no issue running ng serve
or e2e tests which go through both of these modules.
In order to try to create a minimal repro I attempted to fork your Stackblitz Playground and update the Angular 8, and many of your tests fail: https://stackblitz.com/edit/shallow-render-ng8?file=package.json – note that the failures still occur with non-Angular deps at the previous versions, I only upgraded them to see if it resolved the failures.
Can you advise on whether or not the Stackblitz is set up properly? Perhaps there is something I’m missing w.r.t. Angular 8 compatibility in my own app.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
Works perfectly.
👍
Give v8.3.0 a go and see if it fixes your issue. Please report back if you still have issues!