Parcourir la source

Fixed an override reversion that would not take place in case of test failure.

fredck il y a 11 ans
Parent
commit
758b958c6e
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      tests/ckeditor/ckeditor.js

+ 2 - 2
tests/ckeditor/ckeditor.js

@@ -33,10 +33,10 @@ describe( 'getPluginPath()', function() {
 			var basePath = CKEDITOR.basePath;
 			var basePath = CKEDITOR.basePath;
 			var path = CKEDITOR.getPluginPath( 'test' );
 			var path = CKEDITOR.getPluginPath( 'test' );
 
 
-			expect( path ).to.equal( basePath + 'plugins/test/' );
-
+			// Revert the override before assertions or it will not do it in case of errors.
 			CKEDITOR.getPluginPath = originalGetPluginPath;
 			CKEDITOR.getPluginPath = originalGetPluginPath;
 
 
+			expect( path ).to.equal( basePath + 'plugins/test/' );
 			done();
 			done();
 		} );
 		} );
 	} );
 	} );