Skip to content

Commit 8a057ed

Browse files
test(types): add test that checks type for option htmlparser2
1 parent 81f74fb commit 8a057ed

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/types/index.test.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ parse('<hr>', {
6060
}
6161
});
6262

63+
// $ExpectType Element | Element[]
64+
parse('<p/><p/>', {
65+
htmlparser2: {
66+
xmlMode: true,
67+
decodeEntities: true,
68+
lowerCaseTags: false,
69+
lowerCaseAttributeNames: false,
70+
recognizeCDATA: true,
71+
recognizeSelfClosing: true
72+
}
73+
});
74+
6375
// $ExpectType DomElement[]
6476
const domNodes = htmlToDOM('<div>text</div>');
6577

0 commit comments

Comments
 (0)