8
0
Quellcode durchsuchen

Tests: Updated stubs to the latest Sinon API.

Aleksander Nowodzinski vor 8 Jahren
Ursprung
Commit
4d449bad70
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      packages/ckeditor5-engine/tests/view/document/document.js

+ 2 - 2
packages/ckeditor5-engine/tests/view/document/document.js

@@ -326,14 +326,14 @@ describe( 'Document', () => {
 
 	describe( 'scrollToTheSelection()', () => {
 		it( 'does nothing when there are no ranges in the selection', () => {
-			const stub = testUtils.sinon.stub( scrollUtils, 'scrollViewportToShowTarget', () => {} );
+			const stub = testUtils.sinon.stub( scrollUtils, 'scrollViewportToShowTarget' ).callsFake( () => {} );
 
 			viewDocument.scrollToTheSelection();
 			sinon.assert.notCalled( stub );
 		} );
 
 		it( 'scrolls to the first range in selection with an offset', () => {
-			const stub = testUtils.sinon.stub( scrollUtils, 'scrollViewportToShowTarget', () => {} );
+			const stub = testUtils.sinon.stub( scrollUtils, 'scrollViewportToShowTarget' ).callsFake( () => {} );
 			const root = viewDocument.createRoot( document.createElement( 'div' ) );
 			const range = ViewRange.createIn( root );