瀏覽代碼

Update testes.

panr 5 年之前
父節點
當前提交
cd20947927

+ 5 - 9
packages/ckeditor5-image/tests/imageupload/ui/imageuploadpanelview.js

@@ -66,10 +66,8 @@ describe( 'ImageUploadPanelView', () => {
 		describe( 'integrations', () => {
 			it( 'should contain 2 integrations when they were passed to the ImageUloadPanelView as options.integrations', () => {
 				const view = new ImageUploadPanelView( { t: val => val }, {
-					integrations: {
-						'integration1': new View(),
-						'integration2': new ButtonView()
-					}
+					'integration1': new View(),
+					'integration2': new ButtonView()
 				} );
 
 				expect( view._integrations ).to.be.instanceOf( Collection );
@@ -78,11 +76,9 @@ describe( 'ImageUploadPanelView', () => {
 
 			it( 'should contain insertImageViaUrl view when "insertImageViaUrl" token is passed via options.integrations', () => {
 				const view = new ImageUploadPanelView( { t: val => val }, {
-					integrations: {
-						'insertImageViaUrl': 'insertImageViaUrl',
-						'integration1': new View(),
-						'integration2': new ButtonView()
-					}
+					'insertImageViaUrl': 'insertImageViaUrl',
+					'integration1': new View(),
+					'integration2': new ButtonView()
 				} );
 
 				expect( view._integrations ).to.be.instanceOf( Collection );

+ 2 - 2
packages/ckeditor5-image/tests/imageupload/utils.js

@@ -141,7 +141,7 @@ describe( 'upload utils', () => {
 			editorElement.remove();
 		} );
 
-		it( 'should not return any integrations, should return "null" instead', async () => {
+		it( 'should not return any integrations, should return "undefined" instead', async () => {
 			const editorElement = document.createElement( 'div' );
 			document.body.appendChild( editorElement );
 
@@ -155,7 +155,7 @@ describe( 'upload utils', () => {
 					]
 				} );
 
-			expect( prepareIntegrations( editor ) ).to.equal( null );
+			expect( prepareIntegrations( editor ) ).to.equal( undefined );
 
 			editor.destroy();
 			editorElement.remove();