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 elements in tests #45479
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). For more information, open the CLA check for this pull request. |
68cd385
to
18af293
Compare
@cexbrayat thanks for creating this PR!
The changes look great, just left a few minor comments.
052f49f
to
67ce006
Compare
464a47e
to
ce828a7
Compare
6a02152
to
6b556e3
Compare
@cexbrayat the changes look good, thanks Cedric!
We've discussed this change during the team sync and this looks like the approach we want to take. This approach allows us to enable this by default (in one of the next major versions) and use this mechanism for opt-out.
4129e51
to
5e2a608
Compare
We agreed with @AndrewKushnir that |
Allows to provide a TestBed option to throw on unknown elements in templates: ```ts getTestBed().initTestEnvironment( BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { errorOnUnknownElements: true } ); ``` The default value of `errorOnUnknownElements` is `false`, so this is not a breaking change.
5e2a608
to
1d169e8
Compare
Presubmit (note: this change would also require this update in g3) + TGP. |
FYI, the presubmit went well and I'm adding this PR to the merge queue. |
This PR was merged into the repository by commit 6662a97. |
…lar#45479)" This reverts commit 6662a97.
Rolled this back temporarily because I didn't see the g3 patch above. I will roll forward again and sync with the patch. |
This PR was merged into the repository by commit e702caf. |
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 element in a template, we just get a console error.
Issue Number: #36430
What is the new behavior?
Allows to provide a TestBed option to throw on unknown elements in templates:
Does this PR introduce a breaking change?
The default value of
throwOnUnknownElement
isfalse
, so this is not a breaking change.