Skip to content

Commit d2b6a94

Browse files
committed
Add a test case for just a text node.
1 parent 5b493b8 commit d2b6a94

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/parse.js

+7
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,13 @@ test('parse', function (t) {
472472
voidElement: false,
473473
children: []
474474
}], 'should ignore nested HTML comments');
475+
476+
html = 'Hello, world!';
477+
parsed = HTML.parse(html);
478+
t.deepEqual(parsed, [{
479+
type: 'text',
480+
content: 'Hello, world!'
481+
}], 'should handle just text');
475482
t.end();
476483
});
477484

0 commit comments

Comments
 (0)