feat(core): allow to throw on unknown properties in tests#45853
feat(core): allow to throw on unknown properties in tests#45853cexbrayat wants to merge 1 commit intoangular:mainfrom
Conversation
AndrewKushnir
left a comment
There was a problem hiding this comment.
@cexbrayat thanks for the followup PR! I've added a couple minor comments, but overall the change looks good 👍
atscott
left a comment
There was a problem hiding this comment.
reviewed-for: public-api
AndrewKushnir
left a comment
There was a problem hiding this comment.
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
errorOnUnknownElementsoption.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
errorOnUnknownPropertiesisfalse, so this is not a breaking change.Other information