8
0
فهرست منبع

Merge branch 'master' into i/6091

Maciej Gołaszewski 5 سال پیش
والد
کامیت
f51343ee0c

+ 4 - 7
packages/ckeditor5-core/tests/_utils-tests/articlepluginset.js

@@ -29,18 +29,15 @@ import normalizeHtml from '@ckeditor/ckeditor5-utils/tests/_utils/normalizehtml'
 describe( 'ArticlePluginSet', () => {
 	let editor, editorElement;
 
-	beforeEach( () => {
+	beforeEach( async () => {
 		editorElement = document.createElement( 'div' );
 		document.body.appendChild( editorElement );
 
-		return ClassicTestEditor.create( editorElement, { plugins: [ ArticlePluginSet ] } )
-			.then( newEditor => {
-				editor = newEditor;
-			} );
+		editor = await ClassicTestEditor.create( editorElement, { plugins: [ ArticlePluginSet ] } );
 	} );
 
-	afterEach( () => {
-		editor.destroy();
+	afterEach( async () => {
+		await editor.destroy();
 
 		editorElement.remove();
 	} );

+ 1 - 0
packages/ckeditor5-core/tests/_utils/memory.js

@@ -147,6 +147,7 @@ function collectMemoryStats() {
 // 		google-chrome -js-flags="--expose-gc"
 //
 function skipIfNoGarbageCollector() {
+	// eslint-disable-next-line mocha/no-top-level-hooks
 	before( function() {
 		if ( !window.gc ) {
 			this.skip();

+ 1 - 0
packages/ckeditor5-core/tests/_utils/utils.js

@@ -34,6 +34,7 @@ const utils = {
 	 */
 
 	createSinonSandbox() {
+		// eslint-disable-next-line mocha/no-top-level-hooks
 		afterEach( () => {
 			utils.sinon.restore();
 		} );

+ 1 - 1
packages/ckeditor5-core/tests/editor/editor.js

@@ -149,7 +149,7 @@ describe( 'Editor', () => {
 				bar: 'foo',
 				foo: {
 					c: 3
-				},
+				}
 			} );
 
 			expect( editor.config.get( 'foo' ) ).to.deep.equal( {

+ 3 - 2
packages/ckeditor5-core/tests/editor/utils/dataapimixin.js

@@ -22,10 +22,11 @@ describe( 'DataApiMixin', () => {
 		editor.model.document.createRoot( '$root', 'main' );
 		editor.model.document.createRoot( '$root', 'secondRoot' );
 		editor.model.schema.extend( '$text', { allowIn: '$root' } );
+		editor.fire( 'ready' ); // (#6139)
 	} );
 
-	afterEach( () => {
-		editor.destroy();
+	afterEach( async () => {
+		await editor.destroy();
 	} );
 
 	describe( 'setData()', () => {

+ 6 - 3
packages/ckeditor5-core/tests/editor/utils/elementapimixin.js

@@ -15,17 +15,20 @@ describe( 'ElementApiMixin', () => {
 	let editor;
 
 	beforeEach( () => {
-		class CustomEditor extends Editor {}
+		class CustomEditor extends Editor {
+		}
+
 		mix( CustomEditor, ElementApiMixin );
 
 		editor = new CustomEditor();
 		editor.data.processor = new HtmlDataProcessor( editor.editing.view.document );
 		editor.model.document.createRoot();
 		editor.model.schema.extend( '$text', { allowIn: '$root' } );
+		editor.fire( 'ready' ); // (#6139)
 	} );
 
-	afterEach( () => {
-		editor.destroy();
+	afterEach( async () => {
+		await editor.destroy();
 	} );
 
 	describe( 'updateSourceElement()', () => {

+ 1 - 1
packages/ckeditor5-core/tests/manual/formsubmit.js

@@ -14,7 +14,7 @@ document.getElementById( 'form' ).submit = () => {};
 ClassicEditor
 	.create( document.querySelector( '#editor' ), {
 		plugins: [ ArticlePluginSet ],
-		toolbar: [ 'bold', 'italic', 'undo', 'redo' ],
+		toolbar: [ 'bold', 'italic', 'undo', 'redo' ]
 	} )
 	.then( editor => {
 		window.editor = editor;

+ 1 - 1
packages/ckeditor5-core/tests/manual/pendingactions.js

@@ -15,7 +15,7 @@ ClassicEditor
 		plugins: [ ArticlePluginSet, PendingActions ],
 		toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],
 		image: {
-			toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ],
+			toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
 		}
 	} )
 	.then( editor => {

+ 1 - 1
packages/ckeditor5-core/tests/manual/readonly.js

@@ -15,7 +15,7 @@ ClassicEditor
 		plugins: [ ArticlePluginSet, BalloonToolbar ],
 		toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],
 		image: {
-			toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ],
+			toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
 		},
 		balloonToolbar: [ 'bold', 'italic', 'link' ]
 	} )

+ 1 - 1
packages/ckeditor5-core/tests/pendingactions.js

@@ -12,7 +12,7 @@ let editor, pendingActions;
 describe( 'PendingActions', () => {
 	beforeEach( () => {
 		return VirtualTestEditor.create( {
-			plugins: [ PendingActions ],
+			plugins: [ PendingActions ]
 		} ).then( newEditor => {
 			editor = newEditor;
 			pendingActions = editor.plugins.get( PendingActions );