Skip to content

Commit d2964e8

Browse files
test(types): add dtslint tests for trim option
1 parent be71b13 commit d2964e8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

test/types/index.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ parse('<p/><p/>', {
7272
}
7373
});
7474

75+
// $ExpectType Element | Element[]
76+
parse('\t<p>text \r</p>\n', { trim: true });
77+
7578
// $ExpectType DomElement[]
7679
const domNodes = htmlToDOM('<div>text</div>');
7780

test/types/lib/dom-to-react.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ domToReact(htmlToDOM('<a id="header" href="#">Heading</a>'), {
3838
}
3939
}
4040
});
41+
42+
// $ExpectType Element | Element[]
43+
domToReact(htmlToDOM('\t<p>text \r</p>\n'), { trim: true });

0 commit comments

Comments
 (0)