浏览代码

Anticipate temporary console.log in table clipboard paste tests.

Maciej Gołaszewski 5 年之前
父节点
当前提交
b6fe69c235
共有 1 个文件被更改,包括 13 次插入1 次删除
  1. 13 1
      packages/ckeditor5-table/tests/tableclipboard-paste.js

+ 13 - 1
packages/ckeditor5-table/tests/tableclipboard-paste.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-/* globals document */
+/* globals document console */
 
 import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
 import BlockQuoteEditing from '@ckeditor/ckeditor5-block-quote/src/blockquoteediting';
@@ -13,6 +13,7 @@ import ImageCaptionEditing from '@ckeditor/ckeditor5-image/src/imagecaption/imag
 import ImageEditing from '@ckeditor/ckeditor5-image/src/image/imageediting';
 import ListEditing from '@ckeditor/ckeditor5-list/src/listediting';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
+import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 import { getData as getModelData, setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 import { assertEqualMarkup } from '@ckeditor/ckeditor5-utils/tests/_utils/utils';
 import { assertSelectedCells, modelTable, viewTable } from './_utils/utils';
@@ -24,6 +25,8 @@ import TableClipboard from '../src/tableclipboard';
 describe( 'table clipboard', () => {
 	let editor, model, modelRoot, tableSelection, viewDocument, element;
 
+	testUtils.createSinonSandbox();
+
 	beforeEach( () => {
 		element = document.createElement( 'div' );
 		document.body.appendChild( element );
@@ -103,6 +106,9 @@ describe( 'table clipboard', () => {
 				modelRoot.getNodeByPath( [ 0, 1, 1 ] )
 			);
 
+			// Catches the temporary console log in the CK_DEBUG mode.
+			sinon.stub( console, 'log' );
+
 			pasteTable( [
 				[ 'aa', 'ab' ],
 				[ 'ba', 'bb' ]
@@ -128,6 +134,9 @@ describe( 'table clipboard', () => {
 					modelRoot.getNodeByPath( [ 0, 0, 0 ] )
 				);
 
+				// Catches the temporary console log in the CK_DEBUG mode.
+				sinon.stub( console, 'log' );
+
 				pasteTable( [
 					[ 'aa', 'ab' ],
 					[ 'ba', 'bb' ]
@@ -1206,6 +1215,9 @@ describe( 'table clipboard', () => {
 					modelRoot.getNodeByPath( [ 0, 3, 3 ] )
 				);
 
+				// Catches the temporary console log in the CK_DEBUG mode.
+				sinon.stub( console, 'log' );
+
 				pasteTable( [
 					[ 'aa', 'ab' ],
 					[ 'ba', 'bb' ]