[BUG] TypeError: this.iconRegistryService.getIcon is not a function in standalone component test #3751
Open
2 of 9 tasks
Labels
bug
👶🏻 New
For new issues before prioritisation and refinement
NOT Prioritized
Issue not yet prioritized and added to a Milestone
workaround possible
Describe the bug
When testing standalone components with jest (possibly also other test frameworks) the icon component is not properly stubbed even though KirbyTestingModule is used.
Describe how to reproduce the bug
The bug can be verified by checking the following reproduction out, installing dependencies with
npm install
and runningnpm run test
, which gives this result:The module-based component
AppComponent
successfully runs tests, while the standalone component test suite fails withTypeError: this.iconRegistryService.getIcon is not a function
, because the actual icon component implementation is initialized for some reason.Which Kirby version was used?
v9.7.3
andv10.2.1
What was the expected behavior?
Add any screenshots
Please complete the following information:
Are there any additional context?
Checklist:
The following tasks should be carried out in sequence in order to follow the process of contributing correctly.
Verification
To make sure the bug is not intended behaviour; it should be verified by a member of team Kirby before moving on to implementation.
NOT verified
label has been removed by a member of team Kirby; do not proceed until this is done.Implementation
The contributor who wants to implement this issue should:
Review
Once the issue has been implemented and is ready for review:
The text was updated successfully, but these errors were encountered: