Kaynağa Gözat

Tests: Used const for modules and classes.

Piotrek Koszuliński 10 yıl önce
ebeveyn
işleme
ecf1b215c0
2 değiştirilmiş dosya ile 7 ekleme ve 7 silme
  1. 3 3
      tests/ckeditor/basepath.js
  2. 4 4
      tests/ckeditor/ckeditor.js

+ 3 - 3
tests/ckeditor/basepath.js

@@ -5,7 +5,7 @@
 
 'use strict';
 
-var modules = bender.amd.require( 'ckeditor' );
+const modules = bender.amd.require( 'ckeditor' );
 
 beforeEach( function() {
 	// Ensure that no CKEDITOR_BASEPATH global is available.
@@ -24,7 +24,7 @@ describe( 'basePath', function() {
 	testGetBasePathFromTag( '../ckeditor/foo/ckeditor.JS', /\/ckeditor\/foo\/$/ );
 
 	it( 'should work with the CKEDITOR_BASEPATH global', function() {
-		var CKEDITOR = modules.ckeditor;
+		const CKEDITOR = modules.ckeditor;
 
 		window.CKEDITOR_BASEPATH = 'http://foo.com/ckeditor/';
 		expect( CKEDITOR._getBasePath() ).to.equal( 'http://foo.com/ckeditor/' );
@@ -32,7 +32,7 @@ describe( 'basePath', function() {
 
 	function testGetBasePathFromTag( url, expectedBasePath ) {
 		it( 'should work with script tags - ' + url, function() {
-			var CKEDITOR = modules.ckeditor;
+			const CKEDITOR = modules.ckeditor;
 
 			addScript( url );
 

+ 4 - 4
tests/ckeditor/ckeditor.js

@@ -5,11 +5,11 @@
 
 'use strict';
 
-var modules = bender.amd.require( 'ckeditor', 'ckeditor-core' );
+const modules = bender.amd.require( 'ckeditor', 'ckeditor-core' );
 
 describe( 'getPluginPath()', function() {
 	it( 'should return a proper path', function() {
-		var CKEDITOR = modules.ckeditor;
+		const CKEDITOR = modules.ckeditor;
 
 		var basePath = CKEDITOR.basePath;
 		var path = CKEDITOR.getPluginPath( 'test' );
@@ -22,7 +22,7 @@ describe( 'getPluginPath()', function() {
 	} );
 
 	it( '(the production version) should work even when in dev', function() {
-		var CKEDITOR = modules.ckeditor;
+		const CKEDITOR = modules.ckeditor;
 		var core = modules[ 'ckeditor-core' ];
 
 		// To be able to run this test on both dev and production code, we need to override getPluginPath with the
@@ -43,7 +43,7 @@ describe( 'getPluginPath()', function() {
 
 describe( 'isDebug', function() {
 	it( 'is a boolean', function() {
-		var CKEDITOR = modules.ckeditor;
+		const CKEDITOR = modules.ckeditor;
 
 		expect( CKEDITOR.isDebug ).to.be.a( 'boolean' );
 	} );