Procházet zdrojové kódy

Test: Fix "srcset integration" test suite.

Maciej Gołaszewski před 5 roky
rodič
revize
a6ba82ff8f
1 změnil soubory, kde provedl 10 přidání a 8 odebrání
  1. 10 8
      packages/ckeditor5-image/tests/imageresize.js

+ 10 - 8
packages/ckeditor5-image/tests/imageresize.js

@@ -316,8 +316,6 @@ describe( 'ImageResize', () => {
 	} );
 
 	describe( 'srcset integration', () => {
-		beforeEach( () => createEditor() );
-
 		// The image is 96x96 pixels.
 		const imageBaseUrl = '/assets/sample.png';
 		let model;
@@ -330,6 +328,16 @@ describe( 'ImageResize', () => {
 				preloadImage( imageBaseUrl + '?b' ),
 				preloadImage( imageBaseUrl + '?c' )
 			] );
+		} );
+
+		after( () => {
+			for ( const image of images ) {
+				image.remove();
+			}
+		} );
+
+		beforeEach( async () => {
+			await createEditor();
 
 			editor.setData(
 				`<figure class="image">
@@ -345,12 +353,6 @@ describe( 'ImageResize', () => {
 			model = editor.model.document.getRoot().getChild( 0 );
 		} );
 
-		after( () => {
-			for ( const image of images ) {
-				image.remove();
-			}
-		} );
-
 		it( 'works with images containing srcset', () => {
 			const domParts = getWidgetDomParts( editor, widget, 'bottom-right' );
 			const initialPosition = getHandleCenterPoint( domParts.widget, 'bottom-right' );