File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,16 @@ describe('Attrable', () => {
1919 this . setCount += 1
2020 this . #bing = value
2121 }
22+ lastSetHasFoo : any
23+ @attr get hasFoo ( ) {
24+ return false
25+ }
26+ set hasFoo ( v : boolean ) {
27+ this . lastSetHasFoo = v
28+ }
29+ connectedCallback ( ) {
30+ this . hasFoo = true
31+ }
2232 }
2333 window . customElements . define ( 'initialize-attr-test' , InitializeAttrTest )
2434
@@ -104,6 +114,10 @@ describe('Attrable', () => {
104114 instance . bingBaz = 'universe'
105115 expect ( instance ) . to . have . property ( 'bingBaz' , 'universe' )
106116 } )
117+
118+ it ( 'updates default-valued properties in the connected callback' , async ( ) => {
119+ expect ( instance ) . to . have . property ( 'lastSetHasFoo' , true )
120+ } )
107121 }
108122
109123 describe ( 'types' , ( ) => {
You can’t perform that action at this time.
0 commit comments