We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d31abc commit e35be8eCopy full SHA for e35be8e
test/dom-to-react.test.js
@@ -8,6 +8,18 @@ const { render } = require('./helpers');
8
const { html, svg } = require('./data');
9
10
describe('domToReact', () => {
11
+ it.each([
12
+ ['comment', html.comment],
13
+ ['doctype', html.doctype]
14
+ ])('skips %s', (type, value) => {
15
+ expect(domToReact(htmlToDOM(value))).toEqual([]);
16
+ });
17
+
18
+ it('converts "text" to "text"', () => {
19
+ const text = 'text';
20
+ expect(domToReact(htmlToDOM(text))).toBe(text);
21
22
23
it('converts single DOM node to React', () => {
24
const reactElement = domToReact(htmlToDOM(html.single));
25
expect(reactElement).toMatchSnapshot();
0 commit comments