Parcourir la source

Add rejection reason to the fetch stub.

Maciej Gołaszewski il y a 6 ans
Parent
commit
fffba24360

+ 1 - 1
packages/ckeditor5-image/tests/imageupload/imageuploadediting.js

@@ -683,7 +683,7 @@ describe( 'ImageUploadEditing', () => {
 
 		// Stub `fetch` so it can be rejected.
 		sinon.stub( window, 'fetch' ).callsFake( () => {
-			return new Promise( ( res, rej ) => rej() );
+			return new Promise( ( res, rej ) => rej( 'could not fetch' ) );
 		} );
 
 		viewDocument.fire( 'clipboardInput', { dataTransfer, targetRanges: [ targetViewRange ] } );