Browse Source

Use arrow functions.

Piotrek Koszuliński 10 years ago
parent
commit
91222d308b

+ 1 - 1
packages/ckeditor5-ui/src/ckeditorerror.js

@@ -17,7 +17,7 @@
  * @extends Error
  */
 
-CKEDITOR.define( function() {
+CKEDITOR.define( () => {
 	class CKEditorError extends Error {
 		/**
 		 * Creates an instance of the CKEditorError class.

+ 1 - 1
packages/ckeditor5-ui/src/collection.js

@@ -19,7 +19,7 @@
  * @mixins EventEmitter
  */
 
-CKEDITOR.define( [ 'emittermixin', 'ckeditorerror', 'utils' ], function( EmitterMixin, CKEditorError, utils ) {
+CKEDITOR.define( [ 'emittermixin', 'ckeditorerror', 'utils' ], ( EmitterMixin, CKEditorError, utils ) => {
 	class Collection {
 		/**
 		 * Creates a new Collection instance.

+ 1 - 1
packages/ckeditor5-ui/src/config.js

@@ -12,7 +12,7 @@
  * @extends Model
  */
 
-CKEDITOR.define( [ 'model', 'utils' ], function( Model, utils ) {
+CKEDITOR.define( [ 'model', 'utils' ], ( Model, utils ) => {
 	class Config extends Model {
 		/**
 		 * Creates an instance of the {@link Config} class.

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

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

+ 1 - 1
packages/ckeditor5-ui/src/eventinfo.js

@@ -12,7 +12,7 @@
  * @class EventInfo
  */
 
-CKEDITOR.define( [ 'utils' ], function( utils ) {
+CKEDITOR.define( [ 'utils' ], ( utils ) => {
 	class EventInfo {
 		constructor( source, name ) {
 			/**

+ 1 - 1
packages/ckeditor5-ui/src/log.js

@@ -39,7 +39,7 @@
  * @singleton
  */
 
-CKEDITOR.define( function() {
+CKEDITOR.define( () => {
 	const log = {
 		/**
 		 * Logs an error to the console.

+ 4 - 4
packages/ckeditor5-ui/src/model.js

@@ -12,7 +12,7 @@
  * @mixins EventEmitter
  */
 
-CKEDITOR.define( [ 'emittermixin', 'ckeditorerror', 'utils' ], function( EmitterMixin, CKEditorError, utils ) {
+CKEDITOR.define( [ 'emittermixin', 'ckeditorerror', 'utils' ], ( EmitterMixin, CKEditorError, utils ) => {
 	class Model {
 		/**
 		 * Creates a new Model instance.
@@ -57,7 +57,7 @@ CKEDITOR.define( [ 'emittermixin', 'ckeditorerror', 'utils' ], function( Emitter
 		set( name, value ) {
 			// If the first parameter is an Object, we gonna interact through its properties.
 			if ( utils.isObject( name ) ) {
-				Object.keys( name ).forEach( function( attr ) {
+				Object.keys( name ).forEach( ( attr ) => {
 					this.set( attr, name[ attr ] );
 				}, this );
 
@@ -87,11 +87,11 @@ CKEDITOR.define( [ 'emittermixin', 'ckeditorerror', 'utils' ], function( Emitter
 				enumerable: true,
 				configurable: true,
 
-				get: function() {
+				get: () => {
 					return this._attributes[ name ];
 				},
 
-				set: function( value ) {
+				set: ( value ) => {
 					const oldValue = this._attributes[ name ];
 
 					if ( oldValue !== value ) {

+ 1 - 1
packages/ckeditor5-ui/src/ui/domemittermixin.js

@@ -36,7 +36,7 @@
  * @singleton
  */
 
-CKEDITOR.define( [ 'emittermixin', 'utils', 'log' ], function( EmitterMixin, utils, log ) {
+CKEDITOR.define( [ 'emittermixin', 'utils', 'log' ], ( EmitterMixin, utils, log ) => {
 	const DOMEmitterMixin = {
 		/**
 		 * Registers a callback function to be executed when an event is fired in a specific Emitter or DOM Node.

+ 1 - 1
packages/ckeditor5-ui/src/ui/region.js

@@ -12,7 +12,7 @@
  * @extends Model
  */
 
-CKEDITOR.define( [ 'collection', 'model' ], function( Collection, Model ) {
+CKEDITOR.define( [ 'collection', 'model' ], ( Collection, Model ) => {
 	class Region extends Model {
 		/**
 		 * Creates an instance of the {@link Region} class.

+ 1 - 1
packages/ckeditor5-ui/src/ui/template.js

@@ -13,7 +13,7 @@
  * @class Template
  */
 
-CKEDITOR.define( function() {
+CKEDITOR.define( () => {
 	class Template {
 		/**
 		 * Creates an instance of the {@link Template} class.

+ 1 - 1
packages/ckeditor5-ui/src/ui/view.js

@@ -20,7 +20,7 @@ CKEDITOR.define( [
 	'ckeditorerror',
 	'ui/domemittermixin',
 	'utils'
-], function( Collection, Model, Template, CKEditorError, DOMEmitterMixin, utils ) {
+], ( Collection, Model, Template, CKEditorError, DOMEmitterMixin, utils ) => {
 	class View extends Model {
 		/**
 		 * Creates an instance of the {@link View} class.

+ 2 - 2
packages/ckeditor5-ui/src/utils-lodash.js

@@ -13,7 +13,7 @@
 //
 // https://lodash.com/docs
 
-( function() {
+( () => {
 	// The list of Lo-Dash methods to include in "utils".
 	// It is mandatory to execute `grunt lodash` after changes to this list.
 	const lodashInclude = [
@@ -79,7 +79,7 @@
 	if ( typeof module == 'object' && module.exports ) {
 		module.exports = lodashInclude;
 	} else {
-		CKEDITOR.define( function() {
+		CKEDITOR.define( () => {
 			return lodashInclude;
 		} );
 	}

+ 3 - 3
packages/ckeditor5-ui/src/utils.js

@@ -12,7 +12,7 @@
  * @singleton
  */
 
-CKEDITOR.define( [ 'utils-lodash', 'lib/lodash/lodash-ckeditor' ], function( lodashIncludes, lodash ) {
+CKEDITOR.define( [ 'utils-lodash', 'lib/lodash/lodash-ckeditor' ], ( lodashIncludes, lodash ) => {
 	const utils = {
 		/**
 		 * Creates a spy function (ala Sinon.js) that can be used to inspect call to it.
@@ -35,10 +35,10 @@ CKEDITOR.define( [ 'utils-lodash', 'lib/lodash/lodash-ckeditor' ], function( lod
 		 *
 		 * @returns {Number} A number representing the id.
 		 */
-		uid: ( function() {
+		uid: ( () => {
 			let next = 1;
 
-			return function() {
+			return () => {
 				return next++;
 			};
 		} )(),

+ 3 - 3
packages/ckeditor5-ui/tests/_tools/tools.js

@@ -5,7 +5,7 @@
 
 'use strict';
 
-( function() {
+( () => {
 	bender.tools.core = {
 		/**
 		 * Defines CKEditor plugin which is a mock of an editor creator.
@@ -23,8 +23,8 @@
 		 * @param {Object} [proto] Prototype of the creator. Properties from the proto param will
 		 * be copied to the prototype of the creator.
 		 */
-		defineEditorCreatorMock: function( creatorName, proto ) {
-			CKEDITOR.define( 'plugin!creator-' + creatorName, [ 'creator' ], function( Creator ) {
+		defineEditorCreatorMock: ( creatorName, proto ) => {
+			CKEDITOR.define( 'plugin!creator-' + creatorName, [ 'creator' ], ( Creator ) => {
 				return mockCreator( Creator );
 			} );
 

+ 6 - 6
packages/ckeditor5-ui/tests/bender/tools.js

@@ -7,8 +7,8 @@
 
 'use strict';
 
-let createFn3 = function() {};
-let destroyFn3 = function() {};
+let createFn3 = () => {};
+let destroyFn3 = () => {};
 
 bender.tools.core.defineEditorCreatorMock( 'test1' );
 bender.tools.core.defineEditorCreatorMock( 'test2', {
@@ -24,8 +24,8 @@ const modules = bender.amd.require( 'creator', 'plugin!creator-test1', 'plugin!c
 
 ///////////////////
 
-describe( 'bender.tools.core.defineEditorCreatorMock()', function() {
-	it( 'should register all creators', function() {
+describe( 'bender.tools.core.defineEditorCreatorMock()', () => {
+	it( 'should register all creators', () => {
 		const Creator = modules.creator;
 		const TestCreator1 = modules[ 'plugin!creator-test1' ];
 		const TestCreator2 = modules[ 'plugin!creator-test2' ];
@@ -36,14 +36,14 @@ describe( 'bender.tools.core.defineEditorCreatorMock()', function() {
 		expect( TestCreator3.prototype ).to.be.instanceof( Creator );
 	} );
 
-	it( 'should copy properties from the second argument', function() {
+	it( 'should copy properties from the second argument', () => {
 		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() {
+	it( 'should create spies for create() and destroy() if not defined', () => {
 		const TestCreator1 = modules[ 'plugin!creator-test1' ];
 		const TestCreator2 = modules[ 'plugin!creator-test2' ];
 		const TestCreator3 = modules[ 'plugin!creator-test3' ];

+ 28 - 28
packages/ckeditor5-ui/tests/config/config.js

@@ -9,7 +9,7 @@ const modules = bender.amd.require( 'config' );
 
 let config;
 
-beforeEach( function() {
+beforeEach( () => {
 	const Config = modules.config;
 
 	config = new Config( {
@@ -26,8 +26,8 @@ beforeEach( function() {
 	} );
 } );
 
-describe( 'constructor', function() {
-	it( 'should set configurations', function() {
+describe( 'constructor', () => {
+	it( 'should set configurations', () => {
 		expect( config ).to.have.property( 'creator' ).to.equal( 'inline' );
 		expect( config ).to.have.property( 'language' ).to.equal( 'pl' );
 		expect( config ).to.have.property( 'resize' ).to.have.property( 'minheight' ).to.equal( 300 );
@@ -37,7 +37,7 @@ describe( 'constructor', function() {
 		expect( config ).to.have.property( 'toolbar' ).to.equal( 'top' );
 	} );
 
-	it( 'should work with no parameters', function() {
+	it( 'should work with no parameters', () => {
 		const Config = modules.config;
 
 		// No error should be thrown.
@@ -45,15 +45,15 @@ describe( 'constructor', function() {
 	} );
 } );
 
-describe( 'set', function() {
-	it( 'should create Config instances for objects', function() {
+describe( 'set', () => {
+	it( 'should create Config instances for objects', () => {
 		const Config = modules.config;
 
 		expect( config.resize ).to.be.an.instanceof( Config );
 		expect( config.resize.icon ).to.be.an.instanceof( Config );
 	} );
 
-	it( 'should set configurations when passing objects', function() {
+	it( 'should set configurations when passing objects', () => {
 		config.set( {
 			option1: 1,
 			option2: {
@@ -69,13 +69,13 @@ describe( 'set', function() {
 			.to.have.property( 'suboption21' ).to.equal( 21 );
 	} );
 
-	it( 'should set configurations when passing name and value', function() {
+	it( 'should set configurations when passing name and value', () => {
 		config.set( 'something', 'anything' );
 
 		expect( config ).to.have.property( 'something' ).to.equal( 'anything' );
 	} );
 
-	it( 'should set configurations when passing name.with.deep and value', function() {
+	it( 'should set configurations when passing name.with.deep and value', () => {
 		config.set( 'color.red', 'f00' );
 		config.set( 'background.color.blue', '00f' );
 
@@ -89,7 +89,7 @@ describe( 'set', function() {
 			.to.have.property( 'blue' ).to.equal( '00f' );
 	} );
 
-	it( 'should override and expand deep configurations', function() {
+	it( 'should override and expand deep configurations', () => {
 		config.set( {
 			resize: {
 				minHeight: 400,		// Override
@@ -111,7 +111,7 @@ describe( 'set', function() {
 		expect( config.resize.icon ).to.have.property( 'url' ).to.equal( true );
 	} );
 
-	it( 'should replace a simple entry with a Config instance', function() {
+	it( 'should replace a simple entry with a Config instance', () => {
 		const Config = modules.config;
 
 		config.set( 'test', 1 );
@@ -123,7 +123,7 @@ describe( 'set', function() {
 		expect( config.test.prop ).to.equal( 1 );
 	} );
 
-	it( 'should replace a simple entry with a Config instance when passing an object', function() {
+	it( 'should replace a simple entry with a Config instance when passing an object', () => {
 		const Config = modules.config;
 
 		config.set( 'test', 1 );
@@ -137,7 +137,7 @@ describe( 'set', function() {
 		expect( config.test.prop ).to.equal( 1 );
 	} );
 
-	it( 'should replace a simple entry with a Config instance when passing a name.with.deep', function() {
+	it( 'should replace a simple entry with a Config instance when passing a name.with.deep', () => {
 		const Config = modules.config;
 
 		config.set( 'test.prop', 1 );
@@ -148,7 +148,7 @@ describe( 'set', function() {
 		expect( config.test.prop.value ).to.equal( 1 );
 	} );
 
-	it( 'should not create Config instances for non-pure objects', function() {
+	it( 'should not create Config instances for non-pure objects', () => {
 		function SomeClass() {}
 
 		config.set( 'date', new Date() );
@@ -160,7 +160,7 @@ describe( 'set', function() {
 		expect( config.instance ).to.be.an.instanceof( SomeClass );
 	} );
 
-	it( 'should set `null` for undefined value', function() {
+	it( 'should set `null` for undefined value', () => {
 		config.set( 'test' );
 
 		expect( config.test ).to.be.null();
@@ -168,17 +168,17 @@ describe( 'set', function() {
 	} );
 } );
 
-describe( 'get', function() {
-	it( 'should retrieve a configuration', function() {
+describe( 'get', () => {
+	it( 'should retrieve a configuration', () => {
 		expect( config.get( 'creator' ) ).to.equal( 'inline' );
 	} );
 
-	it( 'should retrieve a deep configuration', function() {
+	it( 'should retrieve a deep configuration', () => {
 		expect( config.get( 'resize.minheight' ) ).to.equal( 300 );
 		expect( config.get( 'resize.icon.path' ) ).to.equal( 'xyz' );
 	} );
 
-	it( 'should retrieve a subset of the configuration', function() {
+	it( 'should retrieve a subset of the configuration', () => {
 		let resizeConfig = config.get( 'resize' );
 
 		expect( resizeConfig ).to.have.property( 'minheight' ).to.equal( 300 );
@@ -190,24 +190,24 @@ describe( 'get', function() {
 		expect( iconConfig ).to.have.property( 'path' ).to.equal( 'xyz' );
 	} );
 
-	it( 'should retrieve values case-insensitively', function() {
+	it( 'should retrieve values case-insensitively', () => {
 		expect( config.get( 'Creator' ) ).to.equal( 'inline' );
 		expect( config.get( 'CREATOR' ) ).to.equal( 'inline' );
 		expect( config.get( 'resize.minHeight' ) ).to.equal( 300 );
 		expect( config.get( 'resize.MINHEIGHT' ) ).to.equal( 300 );
 	} );
 
-	it( 'should return undefined for non existing configuration', function() {
+	it( 'should return undefined for non existing configuration', () => {
 		expect( config.get( 'invalid' ) ).to.be.undefined();
 	} );
 
-	it( 'should return undefined for non existing deep configuration', function() {
+	it( 'should return undefined for non existing deep configuration', () => {
 		expect( config.get( 'resize.invalid.value' ) ).to.be.undefined();
 	} );
 } );
 
-describe( 'define', function() {
-	it( 'should create the definition property', function() {
+describe( 'define', () => {
+	it( 'should create the definition property', () => {
 		expect( config ).to.not.have.property( 'definition' );
 
 		config.define( 'test', 1 );
@@ -215,7 +215,7 @@ describe( 'define', function() {
 		expect( config ).to.have.property( 'definition' );
 	} );
 
-	it( 'should set configurations in the definition property', function() {
+	it( 'should set configurations in the definition property', () => {
 		config.define( 'test1', 1 );
 
 		// This is for Code Coverage to ensure that it works when `definition` is already defined.
@@ -225,7 +225,7 @@ describe( 'define', function() {
 		expect( config.definition ).to.have.property( 'test2' ).to.equal( 2 );
 	} );
 
-	it( 'should set configurations passed as object in the definition property', function() {
+	it( 'should set configurations passed as object in the definition property', () => {
 		config.define( {
 			test: 1
 		} );
@@ -233,14 +233,14 @@ describe( 'define', function() {
 		expect( config.definition ).to.have.property( 'test' ).to.equal( 1 );
 	} );
 
-	it( 'should not define main config properties but still be retrieved with get()', function() {
+	it( 'should not define main config properties but still be retrieved with get()', () => {
 		config.define( 'test', 1 );
 
 		expect( config ).to.not.have.property( 'test' );
 		expect( config.get( 'test' ) ).to.equal( 1 );
 	} );
 
-	it( 'should be overridden by set()', function() {
+	it( 'should be overridden by set()', () => {
 		config.define( 'test', 1 );
 		config.set( 'test', 2 );
 

+ 7 - 7
packages/ckeditor5-ui/tests/editorconfig/editorconfig.js

@@ -9,7 +9,7 @@ const modules = bender.amd.require( 'editorconfig', 'ckeditor' );
 
 let config;
 
-beforeEach( function() {
+beforeEach( () => {
 	const EditorConfig = modules.editorconfig;
 
 	config = new EditorConfig( {
@@ -17,18 +17,18 @@ beforeEach( function() {
 	} );
 } );
 
-describe( 'constructor', function() {
-	it( 'should set configurations', function() {
+describe( 'constructor', () => {
+	it( 'should set configurations', () => {
 		expect( config ).to.have.property( 'test' ).to.equal( 1 );
 	} );
 } );
 
-describe( 'get', function() {
-	it( 'should retrieve a configuration', function() {
+describe( 'get', () => {
+	it( 'should retrieve a configuration', () => {
 		expect( config.get( 'test' ) ).to.equal( 1 );
 	} );
 
-	it( 'should fallback to CKEDITOR.config', function() {
+	it( 'should fallback to CKEDITOR.config', () => {
 		const CKEDITOR = modules.ckeditor;
 
 		CKEDITOR.config.set( {
@@ -38,7 +38,7 @@ describe( 'get', function() {
 		expect( config.get( 'globalConfig' ) ).to.equal( 2 );
 	} );
 
-	it( 'should return undefined for non existing configuration', function() {
+	it( 'should return undefined for non existing configuration', () => {
 		expect( config.get( 'invalid' ) ).to.be.undefined();
 	} );
 } );

+ 34 - 34
packages/ckeditor5-ui/tests/emittermixin/emittermixin.js

@@ -11,8 +11,8 @@ let emitter, listener;
 
 beforeEach( refreshEmitter );
 
-describe( 'fire', function() {
-	it( 'should execute callbacks in the right order without priority', function() {
+describe( 'fire', () => {
+	it( 'should execute callbacks in the right order without priority', () => {
 		let spy1 = sinon.spy().named( 1 );
 		let spy2 = sinon.spy().named( 2 );
 		let spy3 = sinon.spy().named( 3 );
@@ -26,7 +26,7 @@ describe( 'fire', function() {
 		sinon.assert.callOrder( spy1, spy2, spy3 );
 	} );
 
-	it( 'should execute callbacks in the right order with priority defined', function() {
+	it( 'should execute callbacks in the right order with priority defined', () => {
 		let spy1 = sinon.spy().named( 1 );
 		let spy2 = sinon.spy().named( 2 );
 		let spy3 = sinon.spy().named( 3 );
@@ -44,7 +44,7 @@ describe( 'fire', function() {
 		sinon.assert.callOrder( spy1, spy2, spy3, spy4, spy5 );
 	} );
 
-	it( 'should pass arguments to callbacks', function() {
+	it( 'should pass arguments to callbacks', () => {
 		const EventInfo = modules.eventinfo;
 
 		let spy1 = sinon.spy();
@@ -59,7 +59,7 @@ describe( 'fire', function() {
 		sinon.assert.calledWithExactly( spy2, sinon.match.instanceOf( EventInfo ), 1, 'b', true );
 	} );
 
-	it( 'should pass proper context to callbacks', function() {
+	it( 'should pass proper context to callbacks', () => {
 		let ctx1 = {};
 		let ctx2 = {};
 
@@ -78,7 +78,7 @@ describe( 'fire', function() {
 		sinon.assert.calledOn( spy3, emitter );
 	} );
 
-	it( 'should fire the right event', function() {
+	it( 'should fire the right event', () => {
 		let spy1 = sinon.spy();
 		let spy2 = sinon.spy();
 
@@ -91,7 +91,7 @@ describe( 'fire', function() {
 		sinon.assert.called( spy2 );
 	} );
 
-	it( 'should execute callbacks many times', function() {
+	it( 'should execute callbacks many times', () => {
 		let spy = sinon.spy();
 
 		emitter.on( 'test', spy );
@@ -103,11 +103,11 @@ describe( 'fire', function() {
 		sinon.assert.calledThrice( spy );
 	} );
 
-	it( 'should do nothing for a non listened event', function() {
+	it( 'should do nothing for a non listened event', () => {
 		emitter.fire( 'test' );
 	} );
 
-	it( 'should accept the same callback many times', function() {
+	it( 'should accept the same callback many times', () => {
 		let spy = sinon.spy();
 
 		emitter.on( 'test', spy );
@@ -120,11 +120,11 @@ describe( 'fire', function() {
 	} );
 } );
 
-describe( 'on', function() {
-	it( 'should stop()', function() {
+describe( 'on', () => {
+	it( 'should stop()', () => {
 		let spy1 = sinon.spy();
 		let spy2 = sinon.spy();
-		let spy3 = sinon.spy( function( event ) {
+		let spy3 = sinon.spy( ( event ) => {
 			event.stop();
 		} );
 
@@ -141,9 +141,9 @@ describe( 'on', function() {
 		sinon.assert.called( spy3 );
 	} );
 
-	it( 'should take a callback off()', function() {
+	it( 'should take a callback off()', () => {
 		let spy1 = sinon.spy();
-		let spy2 = sinon.spy( function( event ) {
+		let spy2 = sinon.spy( ( event ) => {
 			event.off();
 		} );
 		let spy3 = sinon.spy();
@@ -160,8 +160,8 @@ describe( 'on', function() {
 		sinon.assert.calledTwice( spy3 );
 	} );
 
-	it( 'should take the callback off() even after stop()', function() {
-		let spy1 = sinon.spy( function( event ) {
+	it( 'should take the callback off() even after stop()', () => {
+		let spy1 = sinon.spy( ( event ) => {
 			event.stop();
 			event.off();
 		} );
@@ -178,8 +178,8 @@ describe( 'on', function() {
 	} );
 } );
 
-describe( 'once', function() {
-	it( 'should be called just once', function() {
+describe( 'once', () => {
+	it( 'should be called just once', () => {
 		let spy1 = sinon.spy();
 		let spy2 = sinon.spy();
 		let spy3 = sinon.spy();
@@ -196,7 +196,7 @@ describe( 'once', function() {
 		sinon.assert.calledTwice( spy3 );
 	} );
 
-	it( 'should have proper scope', function() {
+	it( 'should have proper scope', () => {
 		let ctx = {};
 
 		let spy1 = sinon.spy();
@@ -211,7 +211,7 @@ describe( 'once', function() {
 		sinon.assert.calledOn( spy2, emitter );
 	} );
 
-	it( 'should have proper arguments', function() {
+	it( 'should have proper arguments', () => {
 		const EventInfo = modules.eventinfo;
 
 		let spy = sinon.spy();
@@ -224,8 +224,8 @@ describe( 'once', function() {
 	} );
 } );
 
-describe( 'off', function() {
-	it( 'should get callbacks off()', function() {
+describe( 'off', () => {
+	it( 'should get callbacks off()', () => {
 		let spy1 = sinon.spy();
 		let spy2 = sinon.spy();
 		let spy3 = sinon.spy();
@@ -246,11 +246,11 @@ describe( 'off', function() {
 		sinon.assert.calledThrice( spy3 );
 	} );
 
-	it( 'should not fail with unknown events', function() {
-		emitter.off( 'test', function() {} );
+	it( 'should not fail with unknown events', () => {
+		emitter.off( 'test', () => {} );
 	} );
 
-	it( 'should remove all entries for the same callback', function() {
+	it( 'should remove all entries for the same callback', () => {
 		let spy1 = sinon.spy().named( 1 );
 		let spy2 = sinon.spy().named( 2 );
 
@@ -269,7 +269,7 @@ describe( 'off', function() {
 		sinon.assert.callCount( spy2, 4 );
 	} );
 
-	it( 'should remove the callback for a specific context only', function() {
+	it( 'should remove the callback for a specific context only', () => {
 		let spy = sinon.spy().named( 1 );
 
 		let ctx1 = { ctx: 1 };
@@ -291,10 +291,10 @@ describe( 'off', function() {
 	} );
 } );
 
-describe( 'listenTo', function() {
+describe( 'listenTo', () => {
 	beforeEach( refreshListener );
 
-	it( 'should properly register callbacks', function() {
+	it( 'should properly register callbacks', () => {
 		let spy = sinon.spy();
 
 		listener.listenTo( emitter, 'test', spy );
@@ -305,10 +305,10 @@ describe( 'listenTo', function() {
 	} );
 } );
 
-describe( 'stopListening', function() {
+describe( 'stopListening', () => {
 	beforeEach( refreshListener );
 
-	it( 'should stop listening to a specific event callback', function() {
+	it( 'should stop listening to a specific event callback', () => {
 		let spy1 = sinon.spy();
 		let spy2 = sinon.spy();
 
@@ -327,7 +327,7 @@ describe( 'stopListening', function() {
 		sinon.assert.calledTwice( spy2 );
 	} );
 
-	it( 'should stop listening to an specific event', function() {
+	it( 'should stop listening to an specific event', () => {
 		let spy1a = sinon.spy();
 		let spy1b = sinon.spy();
 		let spy2 = sinon.spy();
@@ -349,7 +349,7 @@ describe( 'stopListening', function() {
 		sinon.assert.calledTwice( spy2 );
 	} );
 
-	it( 'should stop listening to all events from a specific emitter', function() {
+	it( 'should stop listening to all events from a specific emitter', () => {
 		let spy1 = sinon.spy();
 		let spy2 = sinon.spy();
 
@@ -368,7 +368,7 @@ describe( 'stopListening', function() {
 		sinon.assert.calledOnce( spy2 );
 	} );
 
-	it( 'should stop listening to everything', function() {
+	it( 'should stop listening to everything', () => {
 		let spy1 = sinon.spy();
 		let spy2 = sinon.spy();
 
@@ -394,7 +394,7 @@ describe( 'stopListening', function() {
 		expect( listener ).to.not.have.property( '_listeningTo' );
 	} );
 
-	it( 'should not stop other emitters when a non-listened emitter is provided', function() {
+	it( 'should not stop other emitters when a non-listened emitter is provided', () => {
 		let spy = sinon.spy();
 
 		let emitter1 = getEmitterInstance();

+ 4 - 4
packages/ckeditor5-ui/tests/eventinfo/eventinfo.js

@@ -7,8 +7,8 @@
 
 const modules = bender.amd.require( 'eventinfo' );
 
-describe( 'EventInfo', function() {
-	it( 'should be created properly', function() {
+describe( 'EventInfo', () => {
+	it( 'should be created properly', () => {
 		const EventInfo = modules.eventinfo;
 
 		let event = new EventInfo( this, 'test' );
@@ -19,7 +19,7 @@ describe( 'EventInfo', function() {
 		expect( event.off.called ).to.not.be.true();
 	} );
 
-	it( 'should have stop() and off() marked', function() {
+	it( 'should have stop() and off() marked', () => {
 		const EventInfo = modules.eventinfo;
 
 		let event = new EventInfo( this, 'test' );
@@ -31,7 +31,7 @@ describe( 'EventInfo', function() {
 		expect( event.off.called ).to.be.true();
 	} );
 
-	it( 'should not mark "called" in future instances', function() {
+	it( 'should not mark "called" in future instances', () => {
 		const EventInfo = modules.eventinfo;
 
 		let event = new EventInfo( this, 'test' );

+ 5 - 5
packages/ckeditor5-ui/tests/log/log.js

@@ -10,14 +10,14 @@
 const modules = bender.amd.require( 'log' );
 let spy;
 
-beforeEach( function() {
+beforeEach( () => {
 	if ( spy ) {
 		spy.restore();
 	}
 } );
 
-describe( 'warn()', function() {
-	it( 'logs the message to the console using console.warn()', function() {
+describe( 'warn()', () => {
+	it( 'logs the message to the console using console.warn()', () => {
 		let log = modules.log;
 		let spy = sinon.stub( console, 'warn' );
 		let data = { bar: 1 };
@@ -33,8 +33,8 @@ describe( 'warn()', function() {
 	} );
 } );
 
-describe( 'error()', function() {
-	it( 'logs the message to the console using console.error()', function() {
+describe( 'error()', () => {
+	it( 'logs the message to the console using console.error()', () => {
 		let log = modules.log;
 		let spy = sinon.stub( console, 'error' );
 		let data = { bar: 1 };

+ 15 - 15
packages/ckeditor5-ui/tests/mvc/model/model.js

@@ -9,8 +9,8 @@ const modules = bender.amd.require( 'model', 'eventinfo', 'ckeditorerror' );
 
 let Car, car;
 
-describe( 'Model', function() {
-	beforeEach( 'Create a test model instance', function() {
+describe( 'Model', () => {
+	beforeEach( 'Create a test model instance', () => {
 		const Model = modules.model;
 
 		Car = class extends Model {};
@@ -23,27 +23,27 @@ describe( 'Model', function() {
 
 	//////////
 
-	it( 'should set _attributes on creation', function() {
+	it( 'should set _attributes on creation', () => {
 		expect( car._attributes ).to.deep.equal( {
 			color: 'red',
 			year: 2015
 		} );
 	} );
 
-	it( 'should get correctly after set', function() {
+	it( 'should get correctly after set', () => {
 		car.color = 'blue';
 
 		expect( car.color ).to.equal( 'blue' );
 		expect( car._attributes.color ).to.equal( 'blue' );
 	} );
 
-	it( 'should get correctly after setting _attributes', function() {
+	it( 'should get correctly after setting _attributes', () => {
 		car._attributes.color = 'blue';
 
 		expect( car.color ).to.equal( 'blue' );
 	} );
 
-	it( 'should add properties on creation', function() {
+	it( 'should add properties on creation', () => {
 		let car = new Car( null, {
 			prop: 1
 		} );
@@ -53,8 +53,8 @@ describe( 'Model', function() {
 
 	//////////
 
-	describe( 'set', function() {
-		it( 'should work when passing an object', function() {
+	describe( 'set', () => {
+		it( 'should work when passing an object', () => {
 			car.set( {
 				color: 'blue',	// Override
 				wheels: 4,
@@ -69,7 +69,7 @@ describe( 'Model', function() {
 			} );
 		} );
 
-		it( 'should work when passing a key/value pair', function() {
+		it( 'should work when passing a key/value pair', () => {
 			car.set( 'color', 'blue' );
 			car.set( 'wheels', 4 );
 
@@ -80,7 +80,7 @@ describe( 'Model', function() {
 			} );
 		} );
 
-		it( 'should fire the "change" event', function() {
+		it( 'should fire the "change" event', () => {
 			const EventInfo = modules.eventinfo;
 
 			let spy = sinon.spy();
@@ -119,7 +119,7 @@ describe( 'Model', function() {
 			sinon.assert.calledWithExactly( spyWheels, sinon.match.instanceOf( EventInfo ), 4, sinon.match.typeOf( 'undefined' ) );
 		} );
 
-		it( 'should not fire the "change" event for the same attribute value', function() {
+		it( 'should not fire the "change" event for the same attribute value', () => {
 			let spy = sinon.spy();
 			let spyColor = sinon.spy();
 
@@ -135,7 +135,7 @@ describe( 'Model', function() {
 			sinon.assert.notCalled( spyColor );
 		} );
 
-		it( 'should throw when overriding already existing property', function() {
+		it( 'should throw when overriding already existing property', () => {
 			const CKEditorError = modules.ckeditorerror;
 
 			car.normalProperty = 1;
@@ -147,7 +147,7 @@ describe( 'Model', function() {
 			expect( car ).to.have.property( 'normalProperty', 1 );
 		} );
 
-		it( 'should throw when overriding already existing property (in the prototype)', function() {
+		it( 'should throw when overriding already existing property (in the prototype)', () => {
 			const CKEditorError = modules.ckeditorerror;
 			const Model = modules.model;
 
@@ -165,8 +165,8 @@ describe( 'Model', function() {
 		} );
 	} );
 
-	describe( 'extend', function() {
-		it( 'should create new Model based classes', function() {
+	describe( 'extend', () => {
+		it( 'should create new Model based classes', () => {
 			const Model = modules.model;
 
 			class Truck extends Car {}

+ 14 - 14
packages/ckeditor5-ui/tests/ui/domemittermixin.js

@@ -33,8 +33,8 @@ beforeEach( updateEmitterInstance );
 beforeEach( updateDOMEmitterInstance );
 beforeEach( updateDOMNodeInstance );
 
-describe( 'listenTo', function() {
-	it( 'should listen to EmitterMixin events', function() {
+describe( 'listenTo', () => {
+	it( 'should listen to EmitterMixin events', () => {
 		let spy = bender.sinon.spy();
 
 		domEmitter.listenTo( emitter, 'test', spy );
@@ -43,7 +43,7 @@ describe( 'listenTo', function() {
 		sinon.assert.calledOnce( spy );
 	} );
 
-	it( 'should listen to native DOM events', function() {
+	it( 'should listen to native DOM events', () => {
 		let spy = bender.sinon.spy();
 
 		domEmitter.listenTo( node, 'test', spy );
@@ -55,8 +55,8 @@ describe( 'listenTo', function() {
 	} );
 } );
 
-describe( 'stopListening', function() {
-	it( 'should stop listening to a specific event callback', function() {
+describe( 'stopListening', () => {
+	it( 'should stop listening to a specific event callback', () => {
 		let spy1 = bender.sinon.spy();
 		let spy2 = bender.sinon.spy();
 
@@ -75,7 +75,7 @@ describe( 'stopListening', function() {
 		sinon.assert.calledTwice( spy2 );
 	} );
 
-	it( 'should stop listening to an specific event', function() {
+	it( 'should stop listening to an specific event', () => {
 		let spy1a = bender.sinon.spy();
 		let spy1b = bender.sinon.spy();
 		let spy2 = bender.sinon.spy();
@@ -101,7 +101,7 @@ describe( 'stopListening', function() {
 		sinon.assert.calledTwice( spy2 );
 	} );
 
-	it( 'should stop listening to all events from a specific node', function() {
+	it( 'should stop listening to all events from a specific node', () => {
 		let spy1 = bender.sinon.spy();
 		let spy2 = bender.sinon.spy();
 
@@ -120,7 +120,7 @@ describe( 'stopListening', function() {
 		sinon.assert.calledOnce( spy2 );
 	} );
 
-	it( 'should stop listening to everything', function() {
+	it( 'should stop listening to everything', () => {
 		let spy1 = bender.sinon.spy();
 		let spy2 = bender.sinon.spy();
 
@@ -146,7 +146,7 @@ describe( 'stopListening', function() {
 		expect( domEmitter ).to.not.have.property( '_listeningTo' );
 	} );
 
-	it( 'should not stop other nodes when a non-listened node is provided', function() {
+	it( 'should not stop other nodes when a non-listened node is provided', () => {
 		let spy = bender.sinon.spy();
 
 		let node1 = getDOMNodeInstance();
@@ -161,7 +161,7 @@ describe( 'stopListening', function() {
 		sinon.assert.called( spy );
 	} );
 
-	it( 'should pass DOM Event data to the listener', function() {
+	it( 'should pass DOM Event data to the listener', () => {
 		let spy = bender.sinon.spy();
 
 		let node = getDOMNodeInstance();
@@ -179,7 +179,7 @@ describe( 'stopListening', function() {
 		expect( spy.args[ 0 ][ 1 ] ).to.be.equal( mouseEvent );
 	} );
 
-	it( 'should detach native DOM event listener proxy, specific event', function() {
+	it( 'should detach native DOM event listener proxy, specific event', () => {
 		let spy1a = bender.sinon.spy();
 		let spy1b = bender.sinon.spy();
 
@@ -210,7 +210,7 @@ describe( 'stopListening', function() {
 		sinon.assert.calledTwice( spy2 );
 	} );
 
-	it( 'should detach native DOM event listener proxy, specific callback', function() {
+	it( 'should detach native DOM event listener proxy, specific callback', () => {
 		let spy1a = bender.sinon.spy();
 		let spy1b = bender.sinon.spy();
 		let spy1c = bender.sinon.spy();
@@ -253,7 +253,7 @@ describe( 'stopListening', function() {
 		sinon.assert.calledThrice( spy2 );
 	} );
 
-	it( 'should detach native DOM event listener proxy, specific emitter', function() {
+	it( 'should detach native DOM event listener proxy, specific emitter', () => {
 		let spy1a = bender.sinon.spy();
 		let spy1b = bender.sinon.spy();
 		let spy1c = bender.sinon.spy();
@@ -302,7 +302,7 @@ describe( 'stopListening', function() {
 		sinon.assert.calledTwice( spy3 );
 	} );
 
-	it( 'should detach native DOM event listener proxy, everything', function() {
+	it( 'should detach native DOM event listener proxy, everything', () => {
 		let spy1a = bender.sinon.spy();
 		let spy1b = bender.sinon.spy();
 		let spy1c = bender.sinon.spy();

+ 9 - 9
packages/ckeditor5-ui/tests/ui/region.js

@@ -17,20 +17,20 @@ let region, el;
 
 beforeEach( createRegionInstance );
 
-describe( 'constructor', function() {
-	it( 'accepts name and element', function() {
+describe( 'constructor', () => {
+	it( 'accepts name and element', () => {
 		expect( region ).to.have.property( 'name', 'foo' );
 		expect( region ).to.have.property( 'el', el );
 	} );
 } );
 
-describe( 'views collection', function() {
-	it( 'is an instance of Collection', function() {
+describe( 'views collection', () => {
+	it( 'is an instance of Collection', () => {
 		const Collection = modules.collection;
 		expect( region.views ).to.be.an.instanceof( Collection );
 	} );
 
-	it( 'updates DOM when adding views', function() {
+	it( 'updates DOM when adding views', () => {
 		expect( region.el.childNodes.length ).to.be.equal( 0 );
 
 		region.views.add( new TestViewA() );
@@ -40,7 +40,7 @@ describe( 'views collection', function() {
 		expect( region.el.childNodes.length ).to.be.equal( 2 );
 	} );
 
-	it( 'updates DOM when removing views', function() {
+	it( 'updates DOM when removing views', () => {
 		let viewA = new TestViewA();
 		let viewB = new TestViewB();
 
@@ -60,8 +60,8 @@ describe( 'views collection', function() {
 	} );
 } );
 
-describe( 'destroy', function() {
-	it( 'destroys the region', function() {
+describe( 'destroy', () => {
+	it( 'destroys the region', () => {
 		// Append the region's element to some container.
 		let container = document.createElement( 'div' );
 		container.appendChild( el );
@@ -74,7 +74,7 @@ describe( 'destroy', function() {
 		expect( region.el ).to.be.null;
 	} );
 
-	it( 'destroys children views', function() {
+	it( 'destroys children views', () => {
 		let view = new TestViewA();
 		let spy = bender.sinon.spy( view, 'destroy' );
 

+ 11 - 11
packages/ckeditor5-ui/tests/ui/template.js

@@ -14,8 +14,8 @@ let Template;
 bender.tools.createSinonSandbox();
 beforeEach( createClassReferences );
 
-describe( 'constructor', function() {
-	it( 'accepts the definition', function() {
+describe( 'constructor', () => {
+	it( 'accepts the definition', () => {
 		let def = {
 			tag: 'p'
 		};
@@ -24,12 +24,12 @@ describe( 'constructor', function() {
 	} );
 } );
 
-describe( 'render', function() {
-	it( 'returns null when no definition', function() {
+describe( 'render', () => {
+	it( 'returns null when no definition', () => {
 		expect( new Template().render() ).to.be.null;
 	} );
 
-	it( 'creates an element', function() {
+	it( 'creates an element', () => {
 		let el = new Template( {
 			tag: 'p',
 			attrs: {
@@ -45,7 +45,7 @@ describe( 'render', function() {
 		expect( el.outerHTML ).to.be.equal( '<p class="a b" x="bar">foo</p>' );
 	} );
 
-	it( 'creates element\'s children', function() {
+	it( 'creates element\'s children', () => {
 		let el = new Template( {
 			tag: 'p',
 			attrs: {
@@ -73,8 +73,8 @@ describe( 'render', function() {
 	} );
 } );
 
-describe( 'callback value', function() {
-	it( 'works for attributes', function() {
+describe( 'callback value', () => {
+	it( 'works for attributes', () => {
 		let spy1 = bender.sinon.spy();
 		let spy2 = bender.sinon.spy();
 
@@ -102,7 +102,7 @@ describe( 'callback value', function() {
 		expect( el.outerHTML ).to.be.equal( '<p class="foo"><span id="bar"></span></p>' );
 	} );
 
-	it( 'works for "text" property', function() {
+	it( 'works for "text" property', () => {
 		let spy1 = bender.sinon.spy();
 		let spy2 = bender.sinon.spy();
 
@@ -127,7 +127,7 @@ describe( 'callback value', function() {
 		expect( el.outerHTML ).to.be.equal( '<p>foo</p>' );
 	} );
 
-	it( 'works for "on" property', function() {
+	it( 'works for "on" property', () => {
 		let spy1 = bender.sinon.spy();
 		let spy2 = bender.sinon.spy();
 		let spy3 = bender.sinon.spy();
@@ -155,7 +155,7 @@ describe( 'callback value', function() {
 		sinon.assert.calledWithExactly( spy4, el, 'baz', null );
 	} );
 
-	it( 'works for "on" property with selectors', function() {
+	it( 'works for "on" property with selectors', () => {
 		let spy1 = bender.sinon.spy();
 		let spy2 = bender.sinon.spy();
 		let spy3 = bender.sinon.spy();

+ 28 - 28
packages/ckeditor5-ui/tests/ui/view.js

@@ -16,13 +16,13 @@ bender.tools.createSinonSandbox();
 
 beforeEach( updateModuleReference );
 
-describe( 'constructor', function() {
-	beforeEach( function() {
+describe( 'constructor', () => {
+	beforeEach( () => {
 		setTestViewClass();
 		setTestViewInstance();
 	} );
 
-	it( 'accepts the model', function() {
+	it( 'accepts the model', () => {
 		setTestViewInstance( { a: 'foo', b: 42 } );
 
 		expect( view.model ).to.be.an.instanceof( modules.model );
@@ -31,29 +31,29 @@ describe( 'constructor', function() {
 	} );
 } );
 
-describe( 'instance', function() {
-	beforeEach( function() {
+describe( 'instance', () => {
+	beforeEach( () => {
 		setTestViewClass();
 		setTestViewInstance();
 	} );
 
-	it( 'has no default element', function() {
+	it( 'has no default element', () => {
 		expect( () => view.el ).to.throw( modules.ckeditorerror );
 	} );
 
-	it( 'has no default template', function() {
+	it( 'has no default template', () => {
 		expect( view.template ).to.be.undefined();
 	} );
 
-	it( 'has no default regions', function() {
+	it( 'has no default regions', () => {
 		expect( view.regions ).to.have.length( 0 );
 	} );
 } );
 
-describe( 'bind', function() {
+describe( 'bind', () => {
 	beforeEach( createViewInstanceWithTemplate );
 
-	it( 'returns a function that passes arguments', function() {
+	it( 'returns a function that passes arguments', () => {
 		setTestViewInstance( { a: 'foo' } );
 
 		let spy = bender.sinon.spy();
@@ -70,7 +70,7 @@ describe( 'bind', function() {
 		expect( spy.secondCall.calledWithExactly( 'el', 'bar' ) ).to.be.true;
 	} );
 
-	it( 'allows binding attribute to the model', function() {
+	it( 'allows binding attribute to the model', () => {
 		setTestViewClass( function() {
 			return {
 				tag: 'p',
@@ -89,7 +89,7 @@ describe( 'bind', function() {
 		expect( view.el.outerHTML ).to.be.equal( '<p class="baz">abc</p>' );
 	} );
 
-	it( 'allows binding "text" to the model', function() {
+	it( 'allows binding "text" to the model', () => {
 		setTestViewClass( function() {
 			return {
 				tag: 'p',
@@ -112,7 +112,7 @@ describe( 'bind', function() {
 		expect( view.el.outerHTML ).to.be.equal( '<p>qux</p>' );
 	} );
 
-	it( 'allows binding to the model with value processing', function() {
+	it( 'allows binding to the model with value processing', () => {
 		let callback = ( el, value ) =>
 			( value > 0 ? 'positive' : 'negative' );
 
@@ -133,7 +133,7 @@ describe( 'bind', function() {
 		expect( view.el.outerHTML ).to.be.equal( '<p class="negative">negative</p>' );
 	} );
 
-	it( 'allows binding to the model with custom callback', function() {
+	it( 'allows binding to the model with custom callback', () => {
 		setTestViewClass( function() {
 			return {
 				tag: 'p',
@@ -158,8 +158,8 @@ describe( 'bind', function() {
 	} );
 } );
 
-describe( 'on', function() {
-	it( 'accepts plain binding', function() {
+describe( 'on', () => {
+	it( 'accepts plain binding', () => {
 		let spy = bender.sinon.spy();
 
 		setTestViewClass( function() {
@@ -182,7 +182,7 @@ describe( 'on', function() {
 		);
 	} );
 
-	it( 'accepts an array of event bindings', function() {
+	it( 'accepts an array of event bindings', () => {
 		let spy1 = bender.sinon.spy();
 		let spy2 = bender.sinon.spy();
 
@@ -211,7 +211,7 @@ describe( 'on', function() {
 		);
 	} );
 
-	it( 'accepts DOM selectors', function() {
+	it( 'accepts DOM selectors', () => {
 		let spy1 = bender.sinon.spy();
 		let spy2 = bender.sinon.spy();
 		let spy3 = bender.sinon.spy();
@@ -296,7 +296,7 @@ describe( 'on', function() {
 		sinon.assert.callCount( spy3, 0 );
 	} );
 
-	it( 'accepts function callbacks', function() {
+	it( 'accepts function callbacks', () => {
 		let spy1 = bender.sinon.spy();
 		let spy2 = bender.sinon.spy();
 
@@ -329,7 +329,7 @@ describe( 'on', function() {
 		);
 	} );
 
-	it( 'supports event delegation', function() {
+	it( 'supports event delegation', () => {
 		let spy = bender.sinon.spy();
 
 		setTestViewClass( function() {
@@ -357,7 +357,7 @@ describe( 'on', function() {
 		);
 	} );
 
-	it( 'works for future elements', function() {
+	it( 'works for future elements', () => {
 		let spy = bender.sinon.spy();
 
 		setTestViewClass( function() {
@@ -381,10 +381,10 @@ describe( 'on', function() {
 	} );
 } );
 
-describe( 'render', function() {
+describe( 'render', () => {
 	beforeEach( createViewInstanceWithTemplate );
 
-	it( 'creates an element from template', function() {
+	it( 'creates an element from template', () => {
 		setTestViewInstance( { a: 1 } );
 
 		expect( view.el ).to.be.an.instanceof( HTMLElement );
@@ -392,10 +392,10 @@ describe( 'render', function() {
 	} );
 } );
 
-describe( 'destroy', function() {
+describe( 'destroy', () => {
 	beforeEach( createViewInstanceWithTemplate );
 
-	it( 'detaches the model', function() {
+	it( 'detaches the model', () => {
 		expect( view.model ).to.be.an.instanceof( modules.model );
 
 		view.destroy();
@@ -403,7 +403,7 @@ describe( 'destroy', function() {
 		expect( view.model ).to.be.null;
 	} );
 
-	it( 'detaches the element', function() {
+	it( 'detaches the element', () => {
 		// Append the views's element to some container.
 		let container = document.createElement( 'div' );
 		container.appendChild( view.el );
@@ -418,7 +418,7 @@ describe( 'destroy', function() {
 		expect( view.el.parentNode ).to.be.null;
 	} );
 
-	it( 'destroys child regions', function() {
+	it( 'destroys child regions', () => {
 		const Region = modules[ 'ui/region' ];
 		let region = new Region( 'test' );
 		let spy = bender.sinon.spy( region, 'destroy' );
@@ -430,7 +430,7 @@ describe( 'destroy', function() {
 		expect( spy.calledOnce ).to.be.true;
 	} );
 
-	it( 'detaches bound model listeners', function() {
+	it( 'detaches bound model listeners', () => {
 		setTestViewClass( function() {
 			return {
 				tag: 'p',