-
Notifications
You must be signed in to change notification settings - Fork 25.7k
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
feat(core): allow to throw on unknown properties in tests #45853
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cexbrayat thanks for the followup PR! I've added a couple minor comments, but overall the change looks good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed-for: public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
(sorry, was updating labels on the wrong PR!) @cexbrayat @ me as soon as the comments are fixed, and we can sneak this one into 14! :) |
Allows to provide a TestBed option to throw on unknown properties in templates: ```ts getTestBed().initTestEnvironment( BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { errorOnUnknownProperties: true } ); ``` The default value of `errorOnUnknownProperties` is `false`, so this is not a breaking change.
cfc2db3
to
959e5bc
Compare
@dylhunn @AndrewKushnir Thanks for the review: PR updated with your feedback! |
Merge-assistance: the necessary approvals were received, but reset due to an extra commit that addressed the feedback after the review. I've re-checked the code after the final update and things are looking good. The presubmit is "green", so the PR is now ready for merge. |
This PR was merged into the repository by commit a667592. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
In a test, when using an unknown property in a template, we just get a console error.
This is similar to PR #45479 which introduced an
errorOnUnknownElements
option.Issue Number: #36430
What is the new behavior?
Allows to provide a TestBed option to throw on unknown properties in templates:
Does this PR introduce a breaking change?
The default value of
errorOnUnknownProperties
isfalse
, so this is not a breaking change.Other information