8
0
Maciej Bukowski 7 лет назад
Родитель
Сommit
118bbd6815
1 измененных файлов с 1 добавлено и 23 удалено
  1. 1 23
      packages/ckeditor5-autosave/tests/throttle.js

+ 1 - 23
packages/ckeditor5-autosave/tests/throttle.js

@@ -30,7 +30,7 @@ describe( 'throttle', () => {
 		sinon.assert.calledOnce( spy );
 	} );
 
-	it( 'should run next calls at the specified maximum rate', () => {
+	it( 'should run next calls after specified amount of time', () => {
 		const spy = sinon.spy();
 		const throttledFn = throttle( spy, 100 );
 
@@ -46,28 +46,6 @@ describe( 'throttle', () => {
 		sandbox.clock.tick( 1 );
 
 		sinon.assert.calledTwice( spy );
-		sandbox.clock.runAll();
-	} );
-
-	it( 'should run next calls at the specified maximum rate', () => {
-		const spy = sinon.spy();
-		const throttledFn = throttle( spy, 100 );
-
-		throttledFn();
-		throttledFn();
-
-		sinon.assert.calledOnce( spy );
-
-		sandbox.clock.tick( 99 );
-
-		sinon.assert.calledOnce( spy );
-
-		sandbox.clock.tick( 1 );
-
-		sinon.assert.calledTwice( spy );
-
-		sandbox.clock.runAll();
-		sinon.assert.calledTwice( spy );
 	} );
 
 	it( 'should skip the call if another call is scheduled', () => {