@@ -21,7 +21,7 @@ function filterCalls(echoAdapterSpy, methodType) {
2121
2222describe ( 'wiring' , ( ) => {
2323 describe ( 'component lifecycle and wire adapter' , ( ) => {
24- it ( 'should call a connect when component is connected' , ( ) => {
24+ it ( 'should call a connect when component is connected' , async ( ) => {
2525 const spy = [ ] ;
2626 const elm = createElement ( 'x-echo-adapter-consumer' , { is : ComponentClass } ) ;
2727 AdapterId . setSpy ( spy ) ;
@@ -30,7 +30,7 @@ describe('wiring', () => {
3030 expect ( filterCalls ( spy , 'connect' ) . length ) . toBe ( 1 ) ;
3131 } ) ;
3232
33- it ( 'should call a disconnect when component is disconnected' , ( ) => {
33+ it ( 'should call a disconnect when component is disconnected' , async ( ) => {
3434 const spy = [ ] ;
3535 AdapterId . setSpy ( spy ) ;
3636 const elm = createElement ( 'x-echo-adapter-consumer' , { is : ComponentClass } ) ;
@@ -40,7 +40,7 @@ describe('wiring', () => {
4040 expect ( filterCalls ( spy , 'disconnect' ) . length ) . toBe ( 1 ) ;
4141 } ) ;
4242
43- it ( 'should call a connect and disconnect when component is connected, disconnected twice' , ( ) => {
43+ it ( 'should call a connect and disconnect when component is connected, disconnected twice' , async ( ) => {
4444 const spy = [ ] ;
4545 const elm = createElement ( 'x-echo-adapter-consumer' , { is : ComponentClass } ) ;
4646 AdapterId . setSpy ( spy ) ;
@@ -59,7 +59,7 @@ describe('wiring', () => {
5959 } ) ;
6060
6161 describe ( 'update method on wire adapter' , ( ) => {
62- it ( 'should be called in same tick when component with wire no dynamic params is created' , ( ) => {
62+ it ( 'should be called in same tick when component with wire no dynamic params is created' , async ( ) => {
6363 const spy = [ ] ;
6464 AdapterId . setSpy ( spy ) ;
6565 expect ( spy . length ) . toBe ( 0 ) ;
@@ -83,7 +83,7 @@ describe('wiring', () => {
8383 setFeatureFlagForTest ( 'ENABLE_WIRE_SYNC_EMIT' , false ) ;
8484 } ) ;
8585
86- it ( 'should be called synchronously after connect when a component with wire that has dynamic params is created' , ( ) => {
86+ it ( 'should be called synchronously after connect when a component with wire that has dynamic params is created' , async ( ) => {
8787 const spy = [ ] ;
8888 AdapterId . setSpy ( spy ) ;
8989 expect ( spy . length ) . toBe ( 0 ) ;
@@ -96,7 +96,7 @@ describe('wiring', () => {
9696 expect ( spy [ 1 ] . method ) . toBe ( 'update' ) ;
9797 } ) ;
9898
99- it ( 'should call synchronously update only once when the component is created and a wire dynamic param is modified' , ( ) => {
99+ it ( 'should call synchronously update only once when the component is created and a wire dynamic param is modified' , async ( ) => {
100100 const spy = [ ] ;
101101 AdapterId . setSpy ( spy ) ;
102102 expect ( spy . length ) . toBe ( 0 ) ;
@@ -112,7 +112,7 @@ describe('wiring', () => {
112112 } ) ;
113113 } ) ;
114114
115- it ( 'should be called next tick when the component with wire that has dynamic params is created' , ( ) => {
115+ it ( 'should be called next tick when the component with wire that has dynamic params is created' , async ( ) => {
116116 const spy = [ ] ;
117117 AdapterId . setSpy ( spy ) ;
118118 expect ( spy . length ) . toBe ( 0 ) ;
@@ -130,7 +130,7 @@ describe('wiring', () => {
130130 } ) ;
131131 } ) ;
132132
133- it ( 'should call update only once when the component is created and a wire dynamic param is modified in the same tick' , ( ) => {
133+ it ( 'should call update only once when the component is created and a wire dynamic param is modified in the same tick' , async ( ) => {
134134 const spy = [ ] ;
135135 AdapterId . setSpy ( spy ) ;
136136 expect ( spy . length ) . toBe ( 0 ) ;
@@ -147,7 +147,7 @@ describe('wiring', () => {
147147 } ) ;
148148 } ) ;
149149
150- it ( 'should be called only once during multiple renders when the wire config does not change' , ( ) => {
150+ it ( 'should be called only once during multiple renders when the wire config does not change' , async ( ) => {
151151 const spy = [ ] ;
152152 AdapterId . setSpy ( spy ) ;
153153 const elm = createElement ( 'x-echo-adapter-consumer' , { is : ComponentClass } ) ;
@@ -165,7 +165,7 @@ describe('wiring', () => {
165165 } ) ;
166166 } ) ;
167167
168- it ( 'should be called when the wire parameters change its value.' , ( ) => {
168+ it ( 'should be called when the wire parameters change its value.' , async ( ) => {
169169 const spy = [ ] ;
170170 AdapterId . setSpy ( spy ) ;
171171 const elm = createElement ( 'x-echo-adapter-consumer' , { is : ComponentClass } ) ;
@@ -186,7 +186,7 @@ describe('wiring', () => {
186186 } ) ;
187187 } ) ;
188188
189- it ( 'should be called for common parameter when shared among wires' , ( ) => {
189+ it ( 'should be called for common parameter when shared among wires' , async ( ) => {
190190 const spy = [ ] ;
191191 AdapterId . setSpy ( spy ) ;
192192 const elm = createElement ( 'x-bc-consumer' , { is : BroadcastConsumer } ) ;
@@ -209,7 +209,7 @@ describe('wiring', () => {
209209 } ) ;
210210 } ) ;
211211
212- it ( 'should not update when setting parameter with same value' , ( ) => {
212+ it ( 'should not update when setting parameter with same value' , async ( ) => {
213213 const spy = [ ] ;
214214 const elm = createElement ( 'x-echo-adapter-consumer' , { is : ComponentClass } ) ;
215215 document . body . appendChild ( elm ) ;
@@ -255,7 +255,7 @@ describe('wiring', () => {
255255 expect ( dynamicValue . textContent ) . toBe ( 'modified value' ) ;
256256 } ) ;
257257
258- it ( 'should not call update when component is disconnected.' , ( ) => {
258+ it ( 'should not call update when component is disconnected.' , async ( ) => {
259259 const spy = [ ] ;
260260 AdapterId . setSpy ( spy ) ;
261261 const elm = createElement ( 'x-echo-adapter-consumer' , { is : ComponentClass } ) ;
@@ -272,7 +272,7 @@ describe('wiring', () => {
272272 } ) ;
273273 } ) ;
274274
275- it ( 'should call update when component is re-connected.' , ( ) => {
275+ it ( 'should call update when component is re-connected.' , async ( ) => {
276276 const spy = [ ] ;
277277 AdapterId . setSpy ( spy ) ;
278278 const elm = createElement ( 'x-echo-adapter-consumer' , { is : ComponentClass } ) ;
@@ -302,7 +302,7 @@ describe('wiring', () => {
302302} ) ;
303303
304304describe ( 'wired fields' , ( ) => {
305- it ( 'should rerender component when adapter pushes data' , ( ) => {
305+ it ( 'should rerender component when adapter pushes data' , async ( ) => {
306306 BroadcastAdapter . clearInstances ( ) ;
307307 const elm = createElement ( 'x-bc-consumer' , { is : BroadcastConsumer } ) ;
308308 document . body . appendChild ( elm ) ;
@@ -322,7 +322,7 @@ describe('wired fields', () => {
322322 } ) ;
323323 } ) ;
324324
325- it ( 'should rerender component when wired field is mutated from within the component' , ( ) => {
325+ it ( 'should rerender component when wired field is mutated from within the component' , async ( ) => {
326326 BroadcastAdapter . clearInstances ( ) ;
327327 const elm = createElement ( 'x-bc-consumer' , { is : BroadcastConsumer } ) ;
328328 document . body . appendChild ( elm ) ;
@@ -343,7 +343,7 @@ describe('wired fields', () => {
343343} ) ;
344344
345345describe ( 'wired methods' , ( ) => {
346- it ( 'should call component method when wired to a method' , ( ) => {
346+ it ( 'should call component method when wired to a method' , async ( ) => {
347347 BroadcastAdapter . clearInstances ( ) ;
348348 const elm = createElement ( 'x-bc-consumer' , { is : BroadcastConsumer } ) ;
349349 document . body . appendChild ( elm ) ;
@@ -355,7 +355,7 @@ describe('wired methods', () => {
355355 } ) ;
356356 } ) ;
357357
358- it ( 'should support method override' , ( ) => {
358+ it ( 'should support method override' , async ( ) => {
359359 const spy = [ ] ;
360360 EchoWireAdapter . setSpy ( spy ) ;
361361 const elm = createElement ( 'x-inherited-methods' , { is : InheritedMethods } ) ;
@@ -376,7 +376,7 @@ describe('wired methods', () => {
376376} ) ;
377377
378378describe ( 'context aware' , ( ) => {
379- it ( 'should receive the source element tag name when adapter is constructed' , ( ) => {
379+ it ( 'should receive the source element tag name when adapter is constructed' , async ( ) => {
380380 const spy = [ ] ;
381381 ContextLog . setSpy ( spy ) ;
382382
0 commit comments