File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-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,18 @@ define('component-with-properties', _ => {
7879
7980} )
8081
82+ define ( 'component-without-properties' , _ => {
83+ return (
84+ < div >
85+ < ce-without-properties id = "wc"
86+ amethod = { "method" }
87+ agetter = { "getter" }
88+ areadonly = { "readonly" }
89+ > </ ce-without-properties >
90+ </ div >
91+ )
92+ } )
93+
8194
8295
8396
You can’t perform that action at this time.
0 commit comments