File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,16 @@ describe("basic support", function () {
102102 expect ( data ) . to . eql ( "Omi" ) ;
103103 } ) ;
104104
105+ it ( "will not overwrite unwriteable properties" , function ( ) {
106+ this . weight = 3 ;
107+ let root = render ( < component-without-properties /> , scratch ) ;
108+ let wc = root . shadowRoot . querySelector ( "#wc" ) ;
109+ expect ( wc . getAttribute ( 'amethod' ) ) . to . eql ( 'method' ) ;
110+ expect ( wc . getAttribute ( 'agetter' ) ) . to . eql ( 'getter' ) ;
111+ expect ( wc . getAttribute ( 'areadonly' ) ) . to . eql ( 'readonly' ) ;
112+ expect ( wc . innerHTML ) . to . eql ( 'Success' ) ;
113+ } ) ;
114+
105115 // it('will set boolean attributes on a Custom Element that has not already been defined and upgraded', function () {
106116 // let root = render(<component-with-unregistered />, scratch);
107117 // let wc = root.shadowRoot.querySelector('#wc');
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import 'ce-without-children'
33import 'ce-with-children'
44import 'ce-with-properties'
55import 'ce-with-event'
6+ import 'ce-without-properties'
67
78define ( 'component-without-children' , _ => (
89 < div >
@@ -78,6 +79,23 @@ define('component-with-properties', _ => {
7879
7980} )
8081
82+ define ( 'component-without-properties' , _ => {
83+ const data = {
84+ method : 'method' ,
85+ getter : 'getter' ,
86+ readonly : 'readonly'
87+ }
88+ return (
89+ < div >
90+ < ce-without-properties id = "wc"
91+ amethod = { data . method }
92+ agetter = { data . getter }
93+ areadonly = { data . readonly }
94+ > </ ce-without-properties >
95+ </ div >
96+ )
97+ } )
98+
8199
82100
83101
You can’t perform that action at this time.
0 commit comments