Przeglądaj źródła

Tests: Code refactoring in the view/document tests to suppress Rect utility warnings (see: ckeditor/ckeditor5-utils#178).

Aleksander Nowodzinski 8 lat temu
rodzic
commit
31c64ee3bb

+ 5 - 0
packages/ckeditor5-engine/tests/view/document/document.js

@@ -325,6 +325,11 @@ describe( 'Document', () => {
 	} );
 
 	describe( 'scrollToTheSelection()', () => {
+		beforeEach( () => {
+			// Silence the Rect warnings.
+			testUtils.sinon.stub( log, 'warn' );
+		} );
+
 		it( 'does nothing when there are no ranges in the selection', () => {
 			const stub = testUtils.sinon.stub( global.window, 'scrollTo' );