diff --git a/test/attrable.ts b/test/attrable.ts index 8b4f52f3..7a9521a3 100644 --- a/test/attrable.ts +++ b/test/attrable.ts @@ -19,6 +19,16 @@ describe('Attrable', () => { this.setCount += 1 this.#bing = value } + lastSetHasFoo: any + @attr get hasFoo() { + return false + } + set hasFoo(v: boolean) { + this.lastSetHasFoo = v + } + connectedCallback() { + this.hasFoo = true + } } window.customElements.define('initialize-attr-test', InitializeAttrTest) @@ -104,6 +114,10 @@ describe('Attrable', () => { instance.bingBaz = 'universe' expect(instance).to.have.property('bingBaz', 'universe') }) + + it('updates default-valued properties in the connected callback', async () => { + expect(instance).to.have.property('lastSetHasFoo', true) + }) } describe('types', () => {