@@ -132,7 +132,7 @@ describe('mutation', () => {
132
132
} ) ;
133
133
134
134
it ( 'add root first' , async ( ) => {
135
- await setup ( 'mutation.html' ) ;
135
+ await setup ( 'mutation.html' ) ;
136
136
await page . evaluate ( ( ) => {
137
137
const d1 = document . createElement ( 'div' ) ;
138
138
d1 . id = 'd1' ;
@@ -279,7 +279,7 @@ describe('mutation', () => {
279
279
280
280
it ( 'siblings added in idleCallback' , async ( ) => {
281
281
await setup ( 'mutation.html' ) ;
282
- await page . evaluate ( ( ) => {
282
+ await page . evaluate ( ( ) => {
283
283
document . body . childNodes . forEach ( ( cn ) => document . body . removeChild ( cn ) ) ; // clear out text nodes created by server
284
284
document . body . prepend ( document . createElement ( 'div' ) ) ;
285
285
requestAnimationFrame ( ( ) => {
@@ -294,16 +294,16 @@ describe('mutation', () => {
294
294
) ;
295
295
await assertSnapshot ( mutations , true ) ;
296
296
} ) ;
297
-
297
+
298
298
it ( 'ignored firstchild comment already there' , async ( ) => {
299
299
await setup ( 'mutation-already-there.html' ) ;
300
300
await page . evaluate ( ( ) => {
301
301
const siblingDiv = document . createElement ( 'div' ) ;
302
302
document . getElementById ( 'with-comment' ) . append ( siblingDiv ) ;
303
303
} ) ;
304
304
await waitForRAF ( page ) ;
305
- const mutations = events . filter (
306
- ( e ) => [ EventType . IncrementalSnapshot , EventType . FullSnapshot ] . includes ( e . type ) ,
305
+ const mutations = events . filter ( ( e ) =>
306
+ [ EventType . IncrementalSnapshot , EventType . FullSnapshot ] . includes ( e . type ) ,
307
307
) ;
308
308
await assertSnapshot ( mutations , true ) ;
309
309
} ) ;
@@ -313,12 +313,14 @@ describe('mutation', () => {
313
313
await page . evaluate ( ( ) => {
314
314
const siblingDiv = document . createElement ( 'div' ) ;
315
315
const siblingDiv2 = document . createElement ( 'div' ) ;
316
- document . getElementById ( 'with-comment' ) . insertAdjacentElement ( 'afterbegin' , siblingDiv ) ;
316
+ document
317
+ . getElementById ( 'with-comment' )
318
+ . insertAdjacentElement ( 'afterbegin' , siblingDiv ) ;
317
319
document . getElementById ( 'with-comment' ) . append ( siblingDiv2 ) ;
318
320
} ) ;
319
321
await waitForRAF ( page ) ;
320
- const mutations = events . filter (
321
- ( e ) => [ EventType . IncrementalSnapshot , EventType . FullSnapshot ] . includes ( e . type )
322
+ const mutations = events . filter ( ( e ) =>
323
+ [ EventType . IncrementalSnapshot , EventType . FullSnapshot ] . includes ( e . type ) ,
322
324
) ;
323
325
await assertSnapshot ( mutations , true ) ;
324
326
} ) ;
@@ -327,11 +329,13 @@ describe('mutation', () => {
327
329
await setup ( 'mutation-already-there.html' ) ;
328
330
await page . evaluate ( ( ) => {
329
331
const siblingDiv = document . createElement ( 'div' ) ;
330
- document . getElementById ( 'with-comment' ) . insertAdjacentElement ( 'afterbegin' , siblingDiv ) ;
332
+ document
333
+ . getElementById ( 'with-comment' )
334
+ . insertAdjacentElement ( 'afterbegin' , siblingDiv ) ;
331
335
} ) ;
332
336
await waitForRAF ( page ) ;
333
- const mutations = events . filter (
334
- ( e ) => [ EventType . IncrementalSnapshot , EventType . FullSnapshot ] . includes ( e . type )
337
+ const mutations = events . filter ( ( e ) =>
338
+ [ EventType . IncrementalSnapshot , EventType . FullSnapshot ] . includes ( e . type ) ,
335
339
) ;
336
340
await assertSnapshot ( mutations , true ) ;
337
341
} ) ;
@@ -347,8 +351,8 @@ describe('mutation', () => {
347
351
d1 . append ( siblingDiv ) ;
348
352
} ) ;
349
353
await waitForRAF ( page ) ;
350
- const mutations = events . filter (
351
- ( e ) => [ EventType . IncrementalSnapshot , EventType . FullSnapshot ] . includes ( e . type )
354
+ const mutations = events . filter ( ( e ) =>
355
+ [ EventType . IncrementalSnapshot , EventType . FullSnapshot ] . includes ( e . type ) ,
352
356
) ;
353
357
await assertSnapshot ( mutations , true ) ;
354
358
} ) ;
@@ -366,8 +370,8 @@ describe('mutation', () => {
366
370
d1 . append ( siblingDiv2 ) ;
367
371
} ) ;
368
372
await waitForRAF ( page ) ;
369
- const mutations = events . filter (
370
- ( e ) => [ EventType . IncrementalSnapshot , EventType . FullSnapshot ] . includes ( e . type )
373
+ const mutations = events . filter ( ( e ) =>
374
+ [ EventType . IncrementalSnapshot , EventType . FullSnapshot ] . includes ( e . type ) ,
371
375
) ;
372
376
await assertSnapshot ( mutations , true ) ;
373
377
} ) ;
@@ -383,10 +387,9 @@ describe('mutation', () => {
383
387
d1 . insertAdjacentElement ( 'afterbegin' , siblingDiv ) ;
384
388
} ) ;
385
389
await waitForRAF ( page ) ;
386
- const mutations = events . filter (
387
- ( e ) => [ EventType . IncrementalSnapshot , EventType . FullSnapshot ] . includes ( e . type )
390
+ const mutations = events . filter ( ( e ) =>
391
+ [ EventType . IncrementalSnapshot , EventType . FullSnapshot ] . includes ( e . type ) ,
388
392
) ;
389
393
await assertSnapshot ( mutations , true ) ;
390
394
} ) ;
391
-
392
395
} ) ;
0 commit comments