Add test for whitespace minification at root

This commit is contained in:
Wilson Lin 2018-08-23 00:36:25 +12:00
parent 304e69aba6
commit 198704d344
1 changed files with 13 additions and 0 deletions

View File

@ -26,6 +26,19 @@ describe("hyperbuild", () => {
})).to.equal("<div><section></section><section><h1>Helloo</h1></section></div>");
});
it("should destroy whole whitespace at root", () => {
expect(hyperbuild({
inputCode: `
<div>
<section></section>
</div>
<div>
</div>
`,
})).to.equal("<div><section></section></div><div></div>");
});
it("should throw an error on malformed entities", () => {
[
`<div>&x10FFF;</div>`,