| 1234567891011 |
- const templateMinify = require("../minifyTemplate.js")
- test('Test html string with tempalte', () => {
- expect(templateMinify("let echo = 1;\r html`\r\r\n <div> html test ${echo}\r</div> `",{collapseWhitespace: true}))
- .toBe("let echo=1;html`<div>html test ${echo}</div>`;");
- });
- test('Test simple svg string', () => {
- expect(templateMinify('let echo = 0;svg`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24">\r\n<path d="M${echo} 0h24v24H0z"/>\r\n</svg>`',{collapseWhitespace: true}))
- .toBe('let echo=0;svg`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M${echo} 0h24v24H0z"/></svg>`;');
- });
|