Skip to content

Commit fdfe82e

Browse files
committed
test: dom nest parsing issues #76
1 parent 72f2092 commit fdfe82e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/test-core.spec.ts

+23
Original file line numberDiff line numberDiff line change
@@ -292,3 +292,26 @@ test('should parse with source locations', t => {
292292
];
293293
t.deepEqual(tree, expected);
294294
});
295+
296+
test.only('should parse with input in button', t => {
297+
const html = '<button >Hello <input type="file" ng-hide="true" />PostHtml</button>';
298+
const tree = parser(html);
299+
const expected = [
300+
{
301+
tag: 'button',
302+
content: [
303+
'Hello ',
304+
{
305+
tag: 'input',
306+
attrs: {
307+
type: 'file',
308+
'ng-hide': true
309+
}
310+
},
311+
'PostHtml'
312+
]
313+
}
314+
];
315+
console.log({tree});
316+
t.deepEqual(tree, expected);
317+
});

0 commit comments

Comments
 (0)