Hi Singh,
Recently I am working on templates of `tbl_column_definitions.lib.php`, and I need some help from you.
I met a problem on the unit test:
And here is the test code raise the problem:
The failure is caused by the format of HTML, which will not cause any side effects for user interface. So what should I do to handle this kind of error? Merging spaces in a HTML tag may help, but it seems difficult to distinguish a special case:
Before trimming:
<script>someScript(); //
anotherScript();</script>
After trimming:
<script>someScript(); // anotherScript();</script>
It's obvious that it will cause some Javascripts being commented. Then I figured out a second solution: modify the test scripts and let it pass. This is a "palliative" solution, we have to spend plenty of time to fix this kind of problems.
Maybe we could use a more effective way to test front-end components (templates, pages, etc) in the future, though I haven’t figure out how to achieve this goal yet.
Could you give me some suggestions about this?
Best regards,
Jason