This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Ng-switch commentary has unnecessary white space #14549
Milestone
Comments
ایول |
Thanks for the report. This looks pretty inconsequential, but we might incorporate this change if your open a PR with this. |
Anyway, does this cause you any problems in your app? |
Yep, this broke some unit tests because we've tested the html output. I will open a PR then, thanks. |
But as you said, this is inconsequential with no big impact. |
I'm curious, why would you test the output of ngSwitch in a unit test? Shouldn't you test for presence / absence of non-comment nodes? Because the comments added by angular directives are implementation details. |
Summing this up:
|
Also, this HTML validation shouldn't be done in unit test IMO, automated tests exists for something. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When creating ng-switch-when end commentary, because no comment is passed an unnecessary white space is generated.
Before:
<!-- end ngSwitchWhen: -->
Now:
<!-- end ngSwitchWhen: -->
To prevent that we could do something like this:
The text was updated successfully, but these errors were encountered: