Browse Source

Tests: Use const for classes.

Piotrek Koszuliński 10 years ago
parent
commit
b1e8aa2c25
30 changed files with 72 additions and 72 deletions
  1. 1 1
      packages/ckeditor5-utils/src/document/operation/insertoperation.js
  2. 1 1
      packages/ckeditor5-utils/src/document/operation/reinsertoperation.js
  3. 1 1
      packages/ckeditor5-utils/src/document/operation/removeoperation.js
  4. 3 3
      packages/ckeditor5-utils/src/document/positioniterator.js
  5. 1 1
      packages/ckeditor5-utils/src/emittermixin.js
  6. 8 8
      packages/ckeditor5-utils/tests/bender/tools.js
  7. 12 12
      packages/ckeditor5-utils/tests/ckeditor/ckeditor.js
  8. 5 5
      packages/ckeditor5-utils/tests/ckeditorerror/ckeditorerror.js
  9. 1 1
      packages/ckeditor5-utils/tests/collection/collection.js
  10. 6 6
      packages/ckeditor5-utils/tests/config/config.js
  11. 1 1
      packages/ckeditor5-utils/tests/document/attribute.js
  12. 1 1
      packages/ckeditor5-utils/tests/document/character.js
  13. 1 1
      packages/ckeditor5-utils/tests/document/document.js
  14. 1 1
      packages/ckeditor5-utils/tests/document/element.js
  15. 1 1
      packages/ckeditor5-utils/tests/document/node.js
  16. 1 1
      packages/ckeditor5-utils/tests/document/nodelist.js
  17. 1 1
      packages/ckeditor5-utils/tests/document/operation/changeoperation.js
  18. 1 1
      packages/ckeditor5-utils/tests/document/operation/insertoperation.js
  19. 1 1
      packages/ckeditor5-utils/tests/document/operation/moveoperation.js
  20. 1 1
      packages/ckeditor5-utils/tests/document/operation/reinsertoperation.js
  21. 1 1
      packages/ckeditor5-utils/tests/document/operation/removeoperation.js
  22. 1 1
      packages/ckeditor5-utils/tests/document/position.js
  23. 2 2
      packages/ckeditor5-utils/tests/document/positioniterator.js
  24. 1 1
      packages/ckeditor5-utils/tests/document/range.js
  25. 1 1
      packages/ckeditor5-utils/tests/document/rootelement.js
  26. 2 2
      packages/ckeditor5-utils/tests/document/text.js
  27. 3 3
      packages/ckeditor5-utils/tests/emittermixin/emittermixin.js
  28. 3 3
      packages/ckeditor5-utils/tests/eventinfo/eventinfo.js
  29. 7 7
      packages/ckeditor5-utils/tests/mvc/model/model.js
  30. 2 2
      packages/ckeditor5-utils/tests/plugin/plugin.js

+ 1 - 1
packages/ckeditor5-utils/src/document/operation/insertoperation.js

@@ -51,7 +51,7 @@ CKEDITOR.define( [
 
 		getReversed() {
 			// Because of circular dependencies we need to re-require remove operation here.
-			var RemoveOperation = CKEDITOR.require( 'document/operation/removeoperation' );
+			const RemoveOperation = CKEDITOR.require( 'document/operation/removeoperation' );
 
 			return new RemoveOperation( this.position, this.nodeList.length, this.baseVersion + 1 );
 		}

+ 1 - 1
packages/ckeditor5-utils/src/document/operation/reinsertoperation.js

@@ -23,7 +23,7 @@ CKEDITOR.define( [
 	class ReinsertOperation extends MoveOperation {
 		getReversed() {
 			// Because of circular dependencies we need to re-require reinsert operation here.
-			var RemoveOperation = CKEDITOR.require( 'document/operation/removeoperation' );
+			const RemoveOperation = CKEDITOR.require( 'document/operation/removeoperation' );
 
 			return new RemoveOperation( this.targetPosition, this.howMany, this.baseVersion + 1 );
 		}

+ 1 - 1
packages/ckeditor5-utils/src/document/operation/removeoperation.js

@@ -35,7 +35,7 @@ CKEDITOR.define( [
 
 		getReversed() {
 			// Because of circular dependencies we need to re-require reinsert operation here.
-			var ReinsertOperation = CKEDITOR.require( 'document/operation/reinsertoperation' );
+			const ReinsertOperation = CKEDITOR.require( 'document/operation/reinsertoperation' );
 
 			return new ReinsertOperation( this.targetPosition, this.sourcePosition, this.howMany, this.baseVersion + 1 );
 		}

+ 3 - 3
packages/ckeditor5-utils/src/document/positioniterator.js

@@ -10,9 +10,9 @@ CKEDITOR.define( [
 	'document/element',
 	'document/position'
 ], function( Character, Element, Position ) {
-	var ELEMENT_ENTER = 0;
-	var ELEMENT_LEAVE = 1;
-	var CHARACTER = 2;
+	const ELEMENT_ENTER = 0;
+	const ELEMENT_LEAVE = 1;
+	const CHARACTER = 2;
 
 	/**
 	 * Position iterator class. It allows to iterate forward and backward over the tree document.

+ 1 - 1
packages/ckeditor5-utils/src/emittermixin.js

@@ -13,7 +13,7 @@
  */
 
 CKEDITOR.define( [ 'eventinfo', 'utils' ], function( EventInfo, utils ) {
-	var EmitterMixin = {
+	const EmitterMixin = {
 		/**
 		 * Registers a callback function to be executed when an event is fired.
 		 *

+ 8 - 8
packages/ckeditor5-utils/tests/bender/tools.js

@@ -26,10 +26,10 @@ const modules = bender.amd.require( 'creator', 'plugin!creator-test1', 'plugin!c
 
 describe( 'bender.tools.core.defineEditorCreatorMock()', function() {
 	it( 'should register all creators', function() {
-		var Creator = modules.creator;
-		var TestCreator1 = modules[ 'plugin!creator-test1' ];
-		var TestCreator2 = modules[ 'plugin!creator-test2' ];
-		var TestCreator3 = modules[ 'plugin!creator-test3' ];
+		const Creator = modules.creator;
+		const TestCreator1 = modules[ 'plugin!creator-test1' ];
+		const TestCreator2 = modules[ 'plugin!creator-test2' ];
+		const TestCreator3 = modules[ 'plugin!creator-test3' ];
 
 		expect( TestCreator1.prototype ).to.be.instanceof( Creator );
 		expect( TestCreator2.prototype ).to.be.instanceof( Creator );
@@ -37,16 +37,16 @@ describe( 'bender.tools.core.defineEditorCreatorMock()', function() {
 	} );
 
 	it( 'should copy properties from the second argument', function() {
-		var TestCreator = modules[ 'plugin!creator-test2' ];
+		const TestCreator = modules[ 'plugin!creator-test2' ];
 
 		expect( TestCreator.prototype ).to.have.property( 'foo', 1 );
 		expect( TestCreator.prototype ).to.have.property( 'bar', 2 );
 	} );
 
 	it( 'should create spies for create() and destroy() if not defined', function() {
-		var TestCreator1 = modules[ 'plugin!creator-test1' ];
-		var TestCreator2 = modules[ 'plugin!creator-test2' ];
-		var TestCreator3 = modules[ 'plugin!creator-test3' ];
+		const TestCreator1 = modules[ 'plugin!creator-test1' ];
+		const TestCreator2 = modules[ 'plugin!creator-test2' ];
+		const TestCreator3 = modules[ 'plugin!creator-test3' ];
 
 		expect( TestCreator1.prototype.create ).to.have.property( 'called', false, 'test1.create' );
 		expect( TestCreator1.prototype.destroy ).to.have.property( 'called', false, 'test1.destroy' );

+ 12 - 12
packages/ckeditor5-utils/tests/ckeditor/ckeditor.js

@@ -16,7 +16,7 @@ bender.tools.createSinonSandbox();
 bender.tools.core.defineEditorCreatorMock( 'test' );
 
 beforeEach( function() {
-	var CKEDITOR = modules.ckeditor;
+	const CKEDITOR = modules.ckeditor;
 
 	// Destroy all editor instances.
 	while ( CKEDITOR.instances.length ) {
@@ -26,14 +26,14 @@ beforeEach( function() {
 
 describe( 'create', function() {
 	it( 'should return a promise', function() {
-		var CKEDITOR = modules.ckeditor;
+		const CKEDITOR = modules.ckeditor;
 
 		expect( CKEDITOR.create( content, editorConfig ) ).to.be.instanceof( Promise );
 	} );
 
 	it( 'should create a new editor instance', function() {
-		var CKEDITOR = modules.ckeditor;
-		var Editor = modules.editor;
+		const CKEDITOR = modules.ckeditor;
+		const Editor = modules.editor;
 
 		return CKEDITOR.create( content, editorConfig ).then( function( editor ) {
 			expect( editor ).to.be.instanceof( Editor );
@@ -42,8 +42,8 @@ describe( 'create', function() {
 	} );
 
 	it( 'should create a new editor instance (using a selector)', function() {
-		var CKEDITOR = modules.ckeditor;
-		var Editor = modules.editor;
+		const CKEDITOR = modules.ckeditor;
+		const Editor = modules.editor;
 
 		return CKEDITOR.create( '.editor', editorConfig ).then( function( editor ) {
 			expect( editor ).to.be.instanceof( Editor );
@@ -52,7 +52,7 @@ describe( 'create', function() {
 	} );
 
 	it( 'should set configurations on the new editor', function() {
-		var CKEDITOR = modules.ckeditor;
+		const CKEDITOR = modules.ckeditor;
 
 		return CKEDITOR.create( content, { test: 1, plugins: 'creator-test' } ).then( function( editor ) {
 			expect( editor.config.test ).to.equal( 1 );
@@ -60,7 +60,7 @@ describe( 'create', function() {
 	} );
 
 	it( 'should add the editor to the `instances` collection', function() {
-		var CKEDITOR = modules.ckeditor;
+		const CKEDITOR = modules.ckeditor;
 
 		return CKEDITOR.create( content, editorConfig ).then( function( editor ) {
 			expect( CKEDITOR.instances ).to.have.length( 1 );
@@ -69,7 +69,7 @@ describe( 'create', function() {
 	} );
 
 	it( 'should remove the editor from the `instances` collection on `destroy` event', function() {
-		var CKEDITOR = modules.ckeditor;
+		const CKEDITOR = modules.ckeditor;
 		var editor1, editor2;
 
 		// Create the first editor.
@@ -96,7 +96,7 @@ describe( 'create', function() {
 	} );
 
 	it( 'should be rejected on element not found', function() {
-		var CKEDITOR = modules.ckeditor;
+		const CKEDITOR = modules.ckeditor;
 
 		var addSpy = bender.sinon.spy( CKEDITOR.instances, 'add' );
 
@@ -114,8 +114,8 @@ describe( 'create', function() {
 
 describe( 'config', function() {
 	it( 'should be an instance of Config', function() {
-		var CKEDITOR = modules.ckeditor;
-		var Config = modules.config;
+		const CKEDITOR = modules.ckeditor;
+		const Config = modules.config;
 
 		expect( CKEDITOR.config ).to.be.an.instanceof( Config );
 	} );

+ 5 - 5
packages/ckeditor5-utils/tests/ckeditorerror/ckeditorerror.js

@@ -9,7 +9,7 @@ const modules = bender.amd.require( 'ckeditorerror' );
 
 describe( 'CKEditorError', function() {
 	it( 'inherits from Error', function() {
-		var CKEditorError = modules.ckeditorerror;
+		const CKEditorError = modules.ckeditorerror;
 		var error = new CKEditorError( 'foo' );
 
 		expect( error ).to.be.an.instanceOf( Error );
@@ -17,14 +17,14 @@ describe( 'CKEditorError', function() {
 	} );
 
 	it( 'sets the name', function() {
-		var CKEditorError = modules.ckeditorerror;
+		const CKEditorError = modules.ckeditorerror;
 		var error = new CKEditorError( 'foo' );
 
 		expect( error ).to.have.property( 'name', 'CKEditorError' );
 	} );
 
 	it( 'sets the message', function() {
-		var CKEditorError = modules.ckeditorerror;
+		const CKEditorError = modules.ckeditorerror;
 		var error = new CKEditorError( 'foo' );
 
 		expect( error ).to.have.property( 'message', 'foo' );
@@ -32,7 +32,7 @@ describe( 'CKEditorError', function() {
 	} );
 
 	it( 'sets the message and data', function() {
-		var CKEditorError = modules.ckeditorerror;
+		const CKEditorError = modules.ckeditorerror;
 		var data = { bar: 1 };
 		var error = new CKEditorError( 'foo', data );
 
@@ -47,7 +47,7 @@ describe( 'CKEditorError', function() {
 			}
 		}
 
-		var CKEditorError = modules.ckeditorerror;
+		const CKEditorError = modules.ckeditorerror;
 		var data = {
 			bar: 'a',
 			bom: new Foo(),

+ 1 - 1
packages/ckeditor5-utils/tests/collection/collection.js

@@ -16,7 +16,7 @@ function getItem( id, idProperty ) {
 }
 
 describe( 'Collection', () => {
-	var Collection, CKEditorError;
+	let Collection, CKEditorError;
 
 	before( () => {
 		Collection = modules.collection;

+ 6 - 6
packages/ckeditor5-utils/tests/config/config.js

@@ -10,7 +10,7 @@ const modules = bender.amd.require( 'config' );
 var config;
 
 beforeEach( function() {
-	var Config = modules.config;
+	const Config = modules.config;
 
 	config = new Config( {
 		creator: 'inline',
@@ -38,7 +38,7 @@ describe( 'constructor', function() {
 	} );
 
 	it( 'should work with no parameters', function() {
-		var Config = modules.config;
+		const Config = modules.config;
 
 		// No error should be thrown.
 		config = new Config();
@@ -47,7 +47,7 @@ describe( 'constructor', function() {
 
 describe( 'set', function() {
 	it( 'should create Config instances for objects', function() {
-		var Config = modules.config;
+		const Config = modules.config;
 
 		expect( config.resize ).to.be.an.instanceof( Config );
 		expect( config.resize.icon ).to.be.an.instanceof( Config );
@@ -112,7 +112,7 @@ describe( 'set', function() {
 	} );
 
 	it( 'should replace a simple entry with a Config instance', function() {
-		var Config = modules.config;
+		const Config = modules.config;
 
 		config.set( 'test', 1 );
 		config.set( 'test', {
@@ -124,7 +124,7 @@ describe( 'set', function() {
 	} );
 
 	it( 'should replace a simple entry with a Config instance when passing an object', function() {
-		var Config = modules.config;
+		const Config = modules.config;
 
 		config.set( 'test', 1 );
 		config.set( {
@@ -138,7 +138,7 @@ describe( 'set', function() {
 	} );
 
 	it( 'should replace a simple entry with a Config instance when passing a name.with.deep', function() {
-		var Config = modules.config;
+		const Config = modules.config;
 
 		config.set( 'test.prop', 1 );
 		config.set( 'test.prop.value', 1 );

+ 1 - 1
packages/ckeditor5-utils/tests/document/attribute.js

@@ -10,7 +10,7 @@
 const modules = bender.amd.require( 'document/attribute' );
 
 describe( 'Attribute', function() {
-	var Attribute;
+	let Attribute;
 
 	before( function() {
 		Attribute = modules[ 'document/attribute' ];

+ 1 - 1
packages/ckeditor5-utils/tests/document/character.js

@@ -17,7 +17,7 @@ const modules = bender.amd.require(
 );
 
 describe( 'Character', function() {
-	var Element, Character, Node, Attribute;
+	let Element, Character, Node, Attribute;
 
 	before( function() {
 		Element = modules[ 'document/element' ];

+ 1 - 1
packages/ckeditor5-utils/tests/document/document.js

@@ -14,7 +14,7 @@ const modules = bender.amd.require(
 );
 
 describe( 'Document', function() {
-	var Document, RootElement, CKEditorError;
+	let Document, RootElement, CKEditorError;
 
 	before( function() {
 		Document = modules[ 'document/document' ];

+ 1 - 1
packages/ckeditor5-utils/tests/document/element.js

@@ -17,7 +17,7 @@ const modules = bender.amd.require(
 );
 
 describe( 'Element', function() {
-	var Element, Node, NodeList, Attribute;
+	let Element, Node, NodeList, Attribute;
 
 	before( function() {
 		Element = modules[ 'document/element' ];

+ 1 - 1
packages/ckeditor5-utils/tests/document/node.js

@@ -16,7 +16,7 @@ const modules = bender.amd.require(
 );
 
 describe( 'Node', function() {
-	var Element, Character, Attribute, NodeList, CKEditorError;
+	let Element, Character, Attribute, NodeList, CKEditorError;
 
 	var root;
 	var one, two, three;

+ 1 - 1
packages/ckeditor5-utils/tests/document/nodelist.js

@@ -15,7 +15,7 @@ const modules = bender.amd.require(
 );
 
 describe( 'NodeList', function() {
-	var NodeList, Character, Text, Attribute;
+	let NodeList, Character, Text, Attribute;
 
 	before( function() {
 		NodeList = modules[ 'document/nodelist' ];

+ 1 - 1
packages/ckeditor5-utils/tests/document/operation/changeoperation.js

@@ -20,7 +20,7 @@ const modules = bender.amd.require(
 );
 
 describe( 'ChangeOperation', function() {
-	var Document, ChangeOperation, Position, Range, Character, Attribute, NodeList, Text, CKEditorError;
+	let Document, ChangeOperation, Position, Range, Character, Attribute, NodeList, Text, CKEditorError;
 
 	before( function() {
 		Document = modules[ 'document/document' ];

+ 1 - 1
packages/ckeditor5-utils/tests/document/operation/insertoperation.js

@@ -17,7 +17,7 @@ const modules = bender.amd.require(
 );
 
 describe( 'InsertOperation', function() {
-	var Document, InsertOperation, RemoveOperation, Position, Character;
+	let Document, InsertOperation, RemoveOperation, Position, Character;
 
 	before( function() {
 		Document = modules[ 'document/document' ];

+ 1 - 1
packages/ckeditor5-utils/tests/document/operation/moveoperation.js

@@ -17,7 +17,7 @@ const modules = bender.amd.require(
 );
 
 describe( 'MoveOperation', function() {
-	var Document, MoveOperation, Position, Element, NodeList, CKEditorError;
+	let Document, MoveOperation, Position, Element, NodeList, CKEditorError;
 
 	before( function() {
 		Document = modules[ 'document/document' ];

+ 1 - 1
packages/ckeditor5-utils/tests/document/operation/reinsertoperation.js

@@ -16,7 +16,7 @@ const modules = bender.amd.require(
 );
 
 describe( 'ReinsertOperation', function() {
-	var Document, ReinsertOperation, RemoveOperation, MoveOperation, Position;
+	let Document, ReinsertOperation, RemoveOperation, MoveOperation, Position;
 
 	before( function() {
 		Document = modules[ 'document/document' ];

+ 1 - 1
packages/ckeditor5-utils/tests/document/operation/removeoperation.js

@@ -16,7 +16,7 @@ const modules = bender.amd.require(
 );
 
 describe( 'RemoveOperation', function() {
-	var Document, ReinsertOperation, RemoveOperation, MoveOperation, Position;
+	let Document, ReinsertOperation, RemoveOperation, MoveOperation, Position;
 
 	before( function() {
 		Document = modules[ 'document/document' ];

+ 1 - 1
packages/ckeditor5-utils/tests/document/position.js

@@ -17,7 +17,7 @@ const modules = bender.amd.require(
 );
 
 describe( 'position', function() {
-	var Element, Character, Document, NodeList, Position, CKEditorError;
+	let Element, Character, Document, NodeList, Position, CKEditorError;
 
 	var doc, root, p, ul, li1, li2, f, o, z, b, a, r;
 

+ 2 - 2
packages/ckeditor5-utils/tests/document/positioniterator.js

@@ -17,10 +17,10 @@ const modules = bender.amd.require(
 );
 
 describe( 'range iterator', function() {
-	var Document, Element, Character, PositionIterator, Position, Range;
+	let Document, Element, Character, PositionIterator, Position, Range;
+	let ELEMENT_ENTER, ELEMENT_LEAVE, CHARACTER;
 
 	var doc, expectedItems, root, img1, paragraph, b, a, r, img2, x;
-	var ELEMENT_ENTER, ELEMENT_LEAVE, CHARACTER;
 
 	before( function() {
 		Document = modules[ 'document/document' ];

+ 1 - 1
packages/ckeditor5-utils/tests/document/range.js

@@ -13,7 +13,7 @@ const modules = bender.amd.require(
 );
 
 describe( 'Range', function() {
-	var Range, Position, start, end;
+	let Range, Position, start, end;
 
 	before( function() {
 		Position = modules[ 'document/position' ];

+ 1 - 1
packages/ckeditor5-utils/tests/document/rootelement.js

@@ -16,7 +16,7 @@ const modules = bender.amd.require(
 );
 
 describe( 'Element', function() {
-	var Document, Element, RootElement;
+	let Document, Element, RootElement;
 
 	before( function() {
 		Document = modules[ 'document/document' ];

+ 2 - 2
packages/ckeditor5-utils/tests/document/text.js

@@ -17,8 +17,8 @@ const modules = bender.amd.require(
 describe( 'Text', function() {
 	describe( 'constructor', function() {
 		it( 'should create character without attributes', function() {
-			var Text = modules[ 'document/text' ];
-			var Attribute = modules[ 'document/attribute' ];
+			const Text = modules[ 'document/text' ];
+			const Attribute = modules[ 'document/attribute' ];
 
 			var attrs = [ new Attribute( 'bold', true ) ];
 			var text = new Text( 'bar', attrs );

+ 3 - 3
packages/ckeditor5-utils/tests/emittermixin/emittermixin.js

@@ -45,7 +45,7 @@ describe( 'fire', function() {
 	} );
 
 	it( 'should pass arguments to callbacks', function() {
-		var EventInfo = modules.eventinfo;
+		const EventInfo = modules.eventinfo;
 
 		var spy1 = sinon.spy();
 		var spy2 = sinon.spy();
@@ -212,7 +212,7 @@ describe( 'once', function() {
 	} );
 
 	it( 'should have proper arguments', function() {
-		var EventInfo = modules.eventinfo;
+		const EventInfo = modules.eventinfo;
 
 		var spy = sinon.spy();
 
@@ -419,7 +419,7 @@ function refreshListener() {
 }
 
 function getEmitterInstance() {
-	var EmitterMixin = modules.emittermixin;
+	const EmitterMixin = modules.emittermixin;
 	var utils = modules.utils;
 
 	return utils.extend( {}, EmitterMixin );

+ 3 - 3
packages/ckeditor5-utils/tests/eventinfo/eventinfo.js

@@ -9,7 +9,7 @@ const modules = bender.amd.require( 'eventinfo' );
 
 describe( 'EventInfo', function() {
 	it( 'should be created properly', function() {
-		var EventInfo = modules.eventinfo;
+		const EventInfo = modules.eventinfo;
 
 		var event = new EventInfo( this, 'test' );
 
@@ -20,7 +20,7 @@ describe( 'EventInfo', function() {
 	} );
 
 	it( 'should have stop() and off() marked', function() {
-		var EventInfo = modules.eventinfo;
+		const EventInfo = modules.eventinfo;
 
 		var event = new EventInfo( this, 'test' );
 
@@ -32,7 +32,7 @@ describe( 'EventInfo', function() {
 	} );
 
 	it( 'should not mark "called" in future instances', function() {
-		var EventInfo = modules.eventinfo;
+		const EventInfo = modules.eventinfo;
 
 		var event = new EventInfo( this, 'test' );
 

+ 7 - 7
packages/ckeditor5-utils/tests/mvc/model/model.js

@@ -7,11 +7,11 @@
 
 const modules = bender.amd.require( 'model', 'eventinfo', 'ckeditorerror' );
 
-var Car, car;
+let Car, car;
 
 describe( 'Model', function() {
 	beforeEach( 'Create a test model instance', function() {
-		var Model = modules.model;
+		const Model = modules.model;
 
 		Car = class extends Model {};
 
@@ -81,7 +81,7 @@ describe( 'Model', function() {
 		} );
 
 		it( 'should fire the "change" event', function() {
-			var EventInfo = modules.eventinfo;
+			const EventInfo = modules.eventinfo;
 
 			var spy = sinon.spy();
 			var spyColor = sinon.spy();
@@ -136,7 +136,7 @@ describe( 'Model', function() {
 		} );
 
 		it( 'should throw when overriding already existing property', function() {
-			var CKEditorError = modules.ckeditorerror;
+			const CKEditorError = modules.ckeditorerror;
 
 			car.normalProperty = 1;
 
@@ -148,8 +148,8 @@ describe( 'Model', function() {
 		} );
 
 		it( 'should throw when overriding already existing property (in the prototype)', function() {
-			var CKEditorError = modules.ckeditorerror;
-			var Model = modules.model;
+			const CKEditorError = modules.ckeditorerror;
+			const Model = modules.model;
 
 			class Car extends Model {
 				method() {}
@@ -167,7 +167,7 @@ describe( 'Model', function() {
 
 	describe( 'extend', function() {
 		it( 'should create new Model based classes', function() {
-			var Model = modules.model;
+			const Model = modules.model;
 
 			class Truck extends Car {}
 

+ 2 - 2
packages/ckeditor5-utils/tests/plugin/plugin.js

@@ -9,14 +9,14 @@ const modules = bender.amd.require( 'plugin', 'editor' );
 var editor;
 
 before( function() {
-	var Editor = modules.editor;
+	const Editor = modules.editor;
 
 	editor = new Editor( document.body.appendChild( document.createElement( 'div' ) ) );
 } );
 
 describe( 'constructor', function() {
 	it( 'should set the `editor` property', function() {
-		var Plugin = modules.plugin;
+		const Plugin = modules.plugin;
 
 		var plugin = new Plugin( editor );