Skip to content

Commit

Permalink
Renamed env.areInputEventsLevel1Supported -> env.isInputEventsLevel1S…
Browse files Browse the repository at this point in the history
…upported.
  • Loading branch information
oleq committed Sep 8, 2020
1 parent 2d60753 commit d744cd2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions packages/ckeditor5-utils/src/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const env = {
*
* @type {Boolean}
*/
areInputEventsLevel1Supported: areInputEventsLevel1Supported( global.window )
isInputEventsLevel1Supported: isInputEventsLevel1Supported( global.window )
}
};

Expand Down Expand Up @@ -169,8 +169,8 @@ export function isRegExpUnicodePropertySupported() {
* @param {Window} domWindow The DOM Window interface.
* @returns {Boolean}
*/
export function areInputEventsLevel1Supported( domWindow ) {
export function isInputEventsLevel1Supported( domWindow ) {
const inputEvent = new domWindow.InputEvent( 'input' );

return 'inputType' in inputEvent && 'getTargetRanges' in inputEvent;
return 'inputType' in inputEvent && 'getTargetRanges' in inputEvent;
}
12 changes: 6 additions & 6 deletions packages/ckeditor5-utils/tests/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import env, {
isAndroid,
isBlink,
isRegExpUnicodePropertySupported,
areInputEventsLevel1Supported
isInputEventsLevel1Supported
} from '../src/env';

function toLowerCase( str ) {
Expand Down Expand Up @@ -63,9 +63,9 @@ describe( 'Env', () => {
} );
} );

describe( 'areInputEventsLevel1Supported', () => {
describe( 'isInputEventsLevel1Supported', () => {
it( 'is a boolean', () => {
expect( env.features.areInputEventsLevel1Supported ).to.be.a( 'boolean' );
expect( env.features.isInputEventsLevel1Supported ).to.be.a( 'boolean' );
} );
} );
} );
Expand Down Expand Up @@ -216,7 +216,7 @@ describe( 'Env', () => {
} );
} );

describe( 'areInputEventsLevel1Supported()', () => {
describe( 'isInputEventsLevel1Supported()', () => {
it( 'should detect the Input Events Level 1 support', () => {
class InputEventStubWhenSupported {
constructor() {
Expand All @@ -234,8 +234,8 @@ describe( 'Env', () => {
InputEvent: function () {}
};

expect( areInputEventsLevel1Supported( DOMWindowStubWhenSupported ) ).to.be.true;
expect( areInputEventsLevel1Supported( DOMWindowStubWhenUnsupported ) ).to.be.false;
expect( isInputEventsLevel1Supported( DOMWindowStubWhenSupported ) ).to.be.true;
expect( isInputEventsLevel1Supported( DOMWindowStubWhenUnsupported ) ).to.be.false;
} );
} );
} );

0 comments on commit d744cd2

Please sign in to comment.