Procházet zdrojové kódy

Removed duplicated test.

Maciej Bukowski před 7 roky
rodič
revize
118bbd6815
1 změnil soubory, kde provedl 1 přidání a 23 odebrání
  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 );
 		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 spy = sinon.spy();
 		const throttledFn = throttle( spy, 100 );
 		const throttledFn = throttle( spy, 100 );
 
 
@@ -46,28 +46,6 @@ describe( 'throttle', () => {
 		sandbox.clock.tick( 1 );
 		sandbox.clock.tick( 1 );
 
 
 		sinon.assert.calledTwice( spy );
 		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', () => {
 	it( 'should skip the call if another call is scheduled', () => {