Преглед на файлове

Tests: Fix test for Edge.

Krzysztof Krztoń преди 7 години
родител
ревизия
ae3c045634
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 6 1
      packages/ckeditor5-image/tests/imageupload/imageuploadediting.js

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

@@ -776,7 +776,12 @@ describe( 'ImageUploadEditing', () => {
 	} );
 
 	it( 'should not upload and remove image when `File` constructor is not supported', done => {
-		testUtils.sinon.stub( window, 'File' ).throws( 'Function expected.' );
+		if ( isEdgeEnv ) {
+			// Since on Edge `File` is already stubbed, restore it so that excpetion will be thrown.
+			testUtils.sinon.restore();
+		} else {
+			testUtils.sinon.stub( window, 'File' ).throws( 'Function expected.' );
+		}
 
 		const notification = editor.plugins.get( Notification );