Skip to content

Commit 77bb544

Browse files
Copilotdgreif
andcommitted
Add test for data-catalyst attribute with custom element names
Co-authored-by: dgreif <3026298+dgreif@users.noreply.github.com>
1 parent e488e32 commit 77bb544

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/controller.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ describe('controller', () => {
2727
expect(instance).to.exist
2828
})
2929

30+
it('adds data-catalyst to elements with custom names', async () => {
31+
@controller('custom-named-element')
32+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
33+
class CustomNamedElement extends HTMLElement {}
34+
35+
instance = await fixture(html`<custom-named-element />`)
36+
expect(instance.hasAttribute('data-catalyst')).to.equal(true)
37+
expect(instance.getAttribute('data-catalyst')).to.equal('')
38+
})
39+
3040
it('adds data-catalyst to elements', async () => {
3141
@controller
3242
// eslint-disable-next-line @typescript-eslint/no-unused-vars

0 commit comments

Comments
 (0)