-
Notifications
You must be signed in to change notification settings - Fork 93
Usage of toHaveFormValues with reactive forms without name attribute #162
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
Comments
I'm not sure... We could create a new matcher in our jest-utils package. An easier approach would be to create an angular directive that sets the name? |
Hmm, I'm not also sure what the ideal solution would be, because as you said, this would be tricky for nested forms.. so the implementation would not be really easy. I guess the directive solves the problem. Do you think it would be interesting to document that |
Yes, if you've lost time to investigate this problem I'm sure that adding it to the docs will help future devs 🙂 |
Closing this because #165 is merged. |
Generally when we use reactive forms, we specify
formControlName
, but notname
. Would be possible to overridetoHaveFormValues
in order to avoid specifyname
for every form field?The text was updated successfully, but these errors were encountered: