8
0
فهرست منبع

Moved restoreSpies method to the end of preparation section.

Szymon Kupś 10 سال پیش
والد
کامیت
68228b5c6d
1فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 6 6
      dev/tasks/tests/dev-init.js

+ 6 - 6
dev/tasks/tests/dev-init.js

@@ -27,6 +27,12 @@ describe( 'dev-tasks', () => {
 		beforeEach( () => createSpies() );
 		afterEach( () => restoreSpies() );
 
+		function restoreSpies() {
+			for ( let spy in spies ) {
+				spies[ spy ].restore();
+			}
+		}
+
 		it( 'task should exists', () => expect( initTask ).to.be.a( 'function' ) );
 
 		it( 'performs no action when no ckeditor dependencies are found', () => {
@@ -111,10 +117,4 @@ describe( 'dev-tasks', () => {
 			installGitHooks: sinon.stub( tools, 'installGitHooks' )
 		};
 	}
-
-	function restoreSpies() {
-		for ( let spy in spies ) {
-			spies[ spy ].restore();
-		}
-	}
 } );