-
Notifications
You must be signed in to change notification settings - Fork 306
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]: Input signals in components cause tests to error out (Angular v17.1.0) #2246
Comments
I already had a chat with Angular team about this, an extra AST transformation is needed. WIP to adopt it |
@ahnpnl Love to see you guys are so on top of it! I was wondering what the status of this was, and if you're looking for any additional help. I'd be happy to spearhead this specific issue if the core contributors have higher priorities. |
I just opened a PR. We are trying to use |
I'm also waiting for a fix. Thanks. |
when will the PR be merged? |
We are using nx monorepo where we are still seeing the same issue. We tried the latest version but could not get through. We are using the following versions: angular: 17.1.0 Any help on this would be really helpful. |
I would like to add that this is also a problem when dynamically creating a component through using createComponent. This is really a problem since it prevents us from creating any component that has a signal input. The problem gets even bigger since there is no way of knowing if any inputs are required or not. The ComponentMirror interface is missing that information. |
With 14.0.3 I can set normal input signals, but |
Version
14.0.0
Steps to reproduce
example-app-v17
(specificallyDashboardHeroComponent
)Expected behavior
I expect unit tests to succeed when using
input()
signals in a component.Actual behavior
All tests fail.
For example:
DashboardHeroComponent when inside a test host
fails with the following errors`
Additional context
The diff between my local branch and the mainline branch: main...gpremo-re:jest-preset-angular:main
Environment
The text was updated successfully, but these errors were encountered: