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 () {
102
102
expect ( data ) . to . eql ( "Omi" ) ;
103
103
} ) ;
104
104
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
+
105
115
// it('will set boolean attributes on a Custom Element that has not already been defined and upgraded', function () {
106
116
// let root = render(<component-with-unregistered />, scratch);
107
117
// let wc = root.shadowRoot.querySelector('#wc');
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import 'ce-without-children'
3
3
import 'ce-with-children'
4
4
import 'ce-with-properties'
5
5
import 'ce-with-event'
6
+ import 'ce-without-properties'
6
7
7
8
define ( 'component-without-children' , _ => (
8
9
< div >
@@ -78,6 +79,18 @@ define('component-with-properties', _ => {
78
79
79
80
} )
80
81
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
+
81
94
82
95
83
96
You can’t perform that action at this time.
0 commit comments