Skip to content

Commit 60ef692

Browse files
committed
Add a test for dotted component elements
1 parent f86338a commit 60ef692

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/babel-transform-jsx.test.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@ describe('babel-plugin-transform-jsx-to-htm', () => {
7979
).toBe('html`<${Foo}>a</${Foo}>`;');
8080
});
8181

82+
test('dotted component element', () => {
83+
expect(
84+
compile('(<a.b.c />);')
85+
).toBe('html`<${a.b.c}/>`;');
86+
87+
expect(
88+
compile('(<a.b.c>a</a.b.c>);')
89+
).toBe('html`<${a.b.c}>a</${a.b.c}>`;');
90+
});
91+
8292
test('static text', () => {
8393
expect(
8494
compile(`(<div>Hello</div>);`)

0 commit comments

Comments
 (0)