Skip to content

Commit 8ebc0fb

Browse files
committed
chore: test SVG toPrettyString method
1 parent 23269b0 commit 8ebc0fb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

@iconify/tools/tests/svg/svg-test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ describe('Loading SVG', () => {
2020
expect(svg.toMinifiedString()).toBe(
2121
'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="20" viewBox="-8 -16 24 40"><path d="M3 0v1h4v5h-4v1h5v-7h-5zm1 2v1h-4v1h4v1l2-1.5-2-1.5z"/></svg>'
2222
);
23+
expect(svg.toPrettyString()).toBe(
24+
'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="20" viewBox="-8 -16 24 40">\n\t<path d="M3 0v1h4v5h-4v1h5v-7h-5zm1 2v1h-4v1h4v1l2-1.5-2-1.5z" />\n</svg>\n'
25+
);
2326
expect(svg.getBody()).toBe(
2427
'<path d="M3 0v1h4v5h-4v1h5v-7h-5zm1 2v1h-4v1h4v1l2-1.5-2-1.5z"/>'
2528
);

0 commit comments

Comments
 (0)