8
0
Pārlūkot izejas kodu

Reviewed the tests titles and made better use of "describe" to better match with "it".

fredck 11 gadi atpakaļ
vecāks
revīzija
19e29d09d9
3 mainītis faili ar 12 papildinājumiem un 10 dzēšanām
  1. 3 3
      tests/amd/amd.js
  2. 6 4
      tests/ckeditor/basepath.js
  3. 3 3
      tests/ckeditor/ckeditor.js

+ 3 - 3
tests/amd/amd.js

@@ -13,8 +13,8 @@ CKEDITOR.define( 'testModule', [ 'ckeditor' ], function( ckeditor ) {
 	};
 } );
 
-describe( 'amd', function() {
-	it( 'require() should work with defined module', function( done ) {
+describe( 'CKEDITOR.require()', function() {
+	it( 'should work with a defined module', function( done ) {
 		CKEDITOR.require( [ 'testModule' ], function( testModule ) {
 			expect( testModule ).to.have.property( 'test' ).to.be.true();
 
@@ -22,7 +22,7 @@ describe( 'amd', function() {
 		} );
 	} );
 
-	it( 'require() should work with core module', function( done ) {
+	it( 'should work with a core module', function( done ) {
 		CKEDITOR.require( [ 'utils' ], function( utils ) {
 			expect( utils ).to.be.an( 'object' );
 			done();

+ 6 - 4
tests/ckeditor/basepath.js

@@ -15,8 +15,8 @@ beforeEach( function() {
 	removeScripts();
 } );
 
-describe( 'ckeditor.basePath', function() {
-	it( 'Full URL', function( done ) {
+describe( 'basePath', function() {
+	it( 'should work with script tags', function( done ) {
 		CKEDITOR.require( [ 'ckeditor' ], function( CKEDITOR ) {
 			addScript( 'http://bar.com/ckeditor/ckeditor.js' );
 			expect( CKEDITOR._getBasePath() ).equals( 'http://bar.com/ckeditor/' );
@@ -24,15 +24,17 @@ describe( 'ckeditor.basePath', function() {
 		} );
 	} );
 
-	it( 'CKEDITOR_BASEPATH', function( done ) {
+	it( 'should work with the CKEDITOR_BASEPATH global', function( done ) {
 		CKEDITOR.require( [ 'ckeditor' ], function( CKEDITOR ) {
 			window.CKEDITOR_BASEPATH = 'http://foo.com/ckeditor/';
 			expect( CKEDITOR._getBasePath() ).equals( 'http://foo.com/ckeditor/' );
 			done();
 		} );
 	} );
+} );
 
-	it( 'Ensure that no browser keep script URLs absolute or relative', function( done ) {
+describe( 'This browser', function() {
+	it( 'should not keep script URLs absolute or relative', function( done ) {
 		// Browsers should convert absolute and relative URLs to full URLs.
 		// If this test fails in any browser, _getBasePath() must be reviewed to deal with such case (v4 does it).
 

+ 3 - 3
tests/ckeditor/ckeditor.js

@@ -7,8 +7,8 @@
 
 'use strict';
 
-describe( 'ckeditor', function() {
-	it( 'getPluginPath() with development source code', function( done ) {
+describe( 'getPluginPath()', function() {
+	it( 'should return a proper path', function( done ) {
 		CKEDITOR.require( [ 'ckeditor' ], function( CKEDITOR ) {
 			var basePath = CKEDITOR.basePath;
 			var path = CKEDITOR.getPluginPath( 'test' );
@@ -22,7 +22,7 @@ describe( 'ckeditor', function() {
 		} );
 	} );
 
-	it( 'getPluginPath() with production code', function( done ) {
+	it( '(the production version) should work even when in dev', function( done ) {
 		CKEDITOR.require( [ 'ckeditor', 'ckeditor-core' ], function( CKEDITOR, core ) {
 			// To be able to run this test on both dev and production code, we need to override getPluginPath with the
 			// core version of it and restore it after testing.