Skip to content

Commit 7dd30a7

Browse files
committed
omi
1 parent 083f7eb commit 7dd30a7

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

libraries/omi/src/basic-tests.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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');

libraries/omi/src/components.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'ce-without-children'
33
import 'ce-with-children'
44
import 'ce-with-properties'
55
import 'ce-with-event'
6+
import 'ce-without-properties'
67

78
define('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

0 commit comments

Comments
 (0)