소스 검색

Improved tests.

Maciej Bukowski 7 년 전
부모
커밋
bc8c64b64e
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 5
      packages/ckeditor5-autosave/tests/autosave.js

+ 4 - 5
packages/ckeditor5-autosave/tests/autosave.js

@@ -205,12 +205,11 @@ describe( 'Autosave', () => {
 				expect( pendingActions.isPending ).to.be.true;
 				sinon.assert.calledOnce( serverActionSpy );
 
-				// Wait another 500ms for the second server action.
+				// Wait another 500ms and a promise cycle for the second server action.
 				sandbox.clock.tick( 500 );
-				return Promise.resolve().then( () => {
-					expect( pendingActions.isPending ).to.be.false;
-					sinon.assert.calledTwice( serverActionSpy );
-				} );
+			} ).then( () => {
+				expect( pendingActions.isPending ).to.be.false;
+				sinon.assert.calledTwice( serverActionSpy );
 			} );
 		} );