-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Erroneous test setup due to the usage of contentChildren #8895
Comments
Possibly duplicate of #8634 |
@andreandersson, definitely. I experienced the same problem with |
Any news on this issue? This bug really prevents using the new API. |
Same here. It seems that @satanTime Any idea? |
@PieterjanDeClippel has created a minimal repro here: https://github.com/PieterjanDeClippel/signaltesting/tree/master/src/app |
Any news on this issue? |
A workaround in the meantime... 😕 |
Description of the bug
Let's assume having a component
SystemUnderTestComponent
as the SUT. This component internally rendersActionsComponent
, which will be mocked within the test setup.ActionsComponent
uses the new APIcontentChildren
for accessing its content children. Unfortunately this API causes problems forSystemUnderTestComponent
as the following error is thrown:TypeError: Cannot read properties of undefined (reading 'Symbol(SIGNAL)')
.An example of the bug
https://codesandbox.io/p/sandbox/competent-fermat-llrjgt?file=%2Fsrc%2Ftest.spec.ts%3A35%2C35
Expected behavior
I would expect that the tests of
SystemUnderTestComponent
are not influenced by internals of the mocked componentActionsComponent
.Maybe this behavior is caused by the fact that
ActionsComponent
is mocked and Angular can't findActionComponent
?The text was updated successfully, but these errors were encountered: