@@ -28,7 +28,7 @@ import {
28
28
ComponentWithProperties ,
29
29
ComponentWithUnregistered ,
30
30
ComponentWithImperativeEvent ,
31
- ComponentWithDeclarativeEvent
31
+ ComponentWithDeclarativeEvent ,
32
32
} from "./components" ;
33
33
34
34
// Setup the test harness. This will get cleaned out with every test.
@@ -41,22 +41,22 @@ let reactRoot = null;
41
41
function render ( element ) {
42
42
act ( ( ) => {
43
43
reactRoot . render ( element ) ;
44
- } )
44
+ } ) ;
45
45
}
46
46
47
47
before ( ( ) => {
48
48
window . IS_REACT_ACT_ENVIRONMENT = true ;
49
- } )
49
+ } ) ;
50
50
51
- beforeEach ( function ( ) {
51
+ beforeEach ( function ( ) {
52
52
scratch = document . createElement ( "div" ) ;
53
53
scratch . id = "scratch" ;
54
54
app . appendChild ( scratch ) ;
55
55
56
56
reactRoot = createRoot ( scratch ) ;
57
57
} ) ;
58
58
59
- afterEach ( function ( ) {
59
+ afterEach ( function ( ) {
60
60
app . innerHTML = "" ;
61
61
scratch = null ;
62
62
@@ -65,10 +65,9 @@ afterEach(function() {
65
65
} ) ;
66
66
} ) ;
67
67
68
- describe ( "basic support" , function ( ) {
69
-
70
- describe ( "no children" , function ( ) {
71
- it ( "can display a Custom Element with no children" , function ( ) {
68
+ describe ( "basic support" , function ( ) {
69
+ describe ( "no children" , function ( ) {
70
+ it ( "can display a Custom Element with no children" , function ( ) {
72
71
this . weight = 3 ;
73
72
let root ;
74
73
render (
@@ -83,7 +82,7 @@ describe("basic support", function() {
83
82
} ) ;
84
83
} ) ;
85
84
86
- describe ( "with children" , function ( ) {
85
+ describe ( "with children" , function ( ) {
87
86
function expectHasChildren ( wc ) {
88
87
expect ( wc ) . to . exist ;
89
88
let shadowRoot = wc . shadowRoot ;
@@ -95,7 +94,7 @@ describe("basic support", function() {
95
94
expect ( paragraph . textContent ) . to . eql ( "Test p" ) ;
96
95
}
97
96
98
- it ( "can display a Custom Element with children in a Shadow Root" , function ( ) {
97
+ it ( "can display a Custom Element with children in a Shadow Root" , function ( ) {
99
98
this . weight = 3 ;
100
99
let root ;
101
100
render (
@@ -109,7 +108,7 @@ describe("basic support", function() {
109
108
expectHasChildren ( wc ) ;
110
109
} ) ;
111
110
112
- it ( "can display a Custom Element with children in a Shadow Root and pass in Light DOM children" , async function ( ) {
111
+ it ( "can display a Custom Element with children in a Shadow Root and pass in Light DOM children" , async function ( ) {
113
112
this . weight = 3 ;
114
113
let root ;
115
114
render (
@@ -127,7 +126,7 @@ describe("basic support", function() {
127
126
expect ( wc . textContent . includes ( "2" ) ) . to . be . true ;
128
127
} ) ;
129
128
130
- it ( "can display a Custom Element with children in the Shadow DOM and handle hiding and showing the element" , function ( ) {
129
+ it ( "can display a Custom Element with children in the Shadow DOM and handle hiding and showing the element" , function ( ) {
131
130
this . weight = 3 ;
132
131
let root ;
133
132
render (
@@ -142,7 +141,7 @@ describe("basic support", function() {
142
141
act ( ( ) => {
143
142
root . toggle ( ) ;
144
143
} ) ;
145
- let dummy = ReactDOM . findDOMNode ( root . refs . dummy ) ;
144
+ let dummy = root . dummy . current ;
146
145
expect ( dummy ) . to . exist ;
147
146
expect ( dummy . textContent ) . to . eql ( "Dummy view" ) ;
148
147
act ( ( ) => {
@@ -153,8 +152,8 @@ describe("basic support", function() {
153
152
} ) ;
154
153
} ) ;
155
154
156
- describe ( "attributes and properties" , function ( ) {
157
- it ( "will pass boolean data as either an attribute or a property" , function ( ) {
155
+ describe ( "attributes and properties" , function ( ) {
156
+ it ( "will pass boolean data as either an attribute or a property" , function ( ) {
158
157
this . weight = 3 ;
159
158
let root ;
160
159
render (
@@ -169,7 +168,7 @@ describe("basic support", function() {
169
168
expect ( data ) . to . be . true ;
170
169
} ) ;
171
170
172
- it ( "will pass numeric data as either an attribute or a property" , function ( ) {
171
+ it ( "will pass numeric data as either an attribute or a property" , function ( ) {
173
172
this . weight = 3 ;
174
173
let root ;
175
174
render (
@@ -184,7 +183,7 @@ describe("basic support", function() {
184
183
expect ( parseInt ( data , 10 ) ) . to . eql ( 42 ) ;
185
184
} ) ;
186
185
187
- it ( "will pass string data as either an attribute or a property" , function ( ) {
186
+ it ( "will pass string data as either an attribute or a property" , function ( ) {
188
187
this . weight = 3 ;
189
188
let root ;
190
189
render (
@@ -236,8 +235,8 @@ describe("basic support", function() {
236
235
// });
237
236
} ) ;
238
237
239
- describe ( "events" , function ( ) {
240
- it ( "can imperatively listen to a DOM event dispatched by a Custom Element" , function ( ) {
238
+ describe ( "events" , function ( ) {
239
+ it ( "can imperatively listen to a DOM event dispatched by a Custom Element" , function ( ) {
241
240
this . weight = 3 ;
242
241
let root ;
243
242
render (
@@ -252,9 +251,8 @@ describe("basic support", function() {
252
251
expect ( handled . textContent ) . to . eql ( "false" ) ;
253
252
act ( ( ) => {
254
253
wc . click ( ) ;
255
- } )
254
+ } ) ;
256
255
expect ( handled . textContent ) . to . eql ( "true" ) ;
257
256
} ) ;
258
257
} ) ;
259
-
260
258
} ) ;
0 commit comments