diff --git a/tests/imageresize.js b/tests/imageresize.js index 5482eeb..e3e67e9 100644 --- a/tests/imageresize.js +++ b/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( `
@@ -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' );