Skip to content

Commit f9281a2

Browse files
committed
test: self-closing x-tags
1 parent 64d4e4c commit f9281a2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/test-x-tag.js

+10
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,13 @@ test(`Must process component with namespace's custom path using index file`, asy
6767

6868
t.is(html, expected);
6969
});
70+
71+
test('Must process self-closing component x-tag', async t => {
72+
const actual = `<p>first</p><x-modal /><p>last</p>`;
73+
const expected = `<p>first</p><div>Modal</div><p>last</p>`;
74+
75+
const html = await posthtml([plugin({root: './test/templates', folders: 'components'})])
76+
.process(actual, {recognizeSelfClosing: true}).then(result => clean(result.html));
77+
78+
t.is(html, expected);
79+
});

0 commit comments

Comments
 (0)