asyncLiz / minify-html-literals

Minify HTML template literal strings
MIT License
68 stars 14 forks source link

Add test for nested template literals #36

Closed TimvdLippe closed 3 years ago

TimvdLippe commented 3 years ago

Initially I thought this package wouldn't work for nested template literals (which ChromeDevTools used). I wanted to do TDD and add the test first (since there was no test for it yet) and I discovered this use case is already covered. That's because the template.tag for MemberExpressions already includes the whole line, and thus it matches on lihtml.html, which indeed includes html.

So let's add the test to make sure this use case remains covers, but no actual code changes are required :tada:

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 104


Totals Coverage Status
Change from base Build 96: 0.0%
Covered Lines: 125
Relevant Lines: 135

💛 - Coveralls
asyncLiz commented 3 years ago

LGTM, thanks for the PR!