Skip to content

Commit

Permalink
Tests: minor tests corrections, merged var statements, fixed typos etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewand committed Oct 3, 2018
1 parent c05424e commit 2850ae1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions tests/plugins/emoji/basic.js
Expand Up @@ -29,10 +29,10 @@
}
};

var stub = null;

// Disable autocomplete throttling so the tests can be run synchronously.
var throttle = CKEDITOR.tools.buffers.throttle;
var throttle = CKEDITOR.tools.buffers.throttle,
stub = null;

sinon.stub( CKEDITOR.tools.buffers, 'throttle', function( minInterval, output, contextObj ) {
return new throttle( 0, output, contextObj );
} );
Expand All @@ -54,8 +54,8 @@

bot.setHtmlWithSelection( '<p>foo :dagg^</p>' );
editor.editable().fire( 'keyup', new CKEDITOR.dom.event( {} ) );
assert.areSame( ':dagg', autocomplete.model.query, 'Model keeps wrong querry.' );
assert.areSame( 1, autocomplete.model.data.length, 'Emoji result contains more than one result.' );
assert.areSame( ':dagg', autocomplete.model.query, 'Model keeps wrong query' );
assert.areSame( 1, autocomplete.model.data.length, 'Emoji result contains more than one result' );
objectAssert.areEqual( { id: ':dagger:', symbol: '🗡' }, autocomplete.model.data[ 0 ], 'Emoji result contains wrong result' );
autocomplete.close();
} );
Expand Down Expand Up @@ -100,8 +100,8 @@

'test emoji objects are added to editor': function( editor ) {
emojiTools.runAfterInstanceReady( editor, null, function( editor ) {
assert.isObject( editor._.emoji, 'Emoji variable doesn\' exists.' );
objectAssert.ownsKeys( [ 'list', 'autocomplete' ], editor._.emoji, 'Emoji variable is missing some keys.' );
assert.isObject( editor._.emoji, 'Emoji variable doesn\' exists' );
objectAssert.ownsKeys( [ 'list', 'autocomplete' ], editor._.emoji, 'Emoji variable is missing some keys' );
} );
},

Expand All @@ -111,8 +111,8 @@

bot.setHtmlWithSelection( '<p>foo :bug^</p>' );
editor.editable().fire( 'keyup', new CKEDITOR.dom.event( {} ) );
assert.areSame( ':bug', autocomplete.model.query, 'Model keeps wrong querry.' );
assert.areSame( 1, autocomplete.model.data.length, 'Emoji result contains more than one result.' );
assert.areSame( ':bug', autocomplete.model.query, 'Model keeps wrong query' );
assert.areSame( 1, autocomplete.model.data.length, 'Emoji result contains more than one result' );
objectAssert.areEqual( { id: ':bug:', symbol: '🐛' }, autocomplete.model.data[ 0 ], 'Emoji result contains wrong result' );
} );
},
Expand Down Expand Up @@ -179,8 +179,8 @@

bot.setHtmlWithSelection( '<p>foo :collision :collision^</p>' );
editor.editable().fire( 'keyup', new CKEDITOR.dom.event( {} ) );
assert.areSame( ':collision', autocomplete.model.query, 'Model keeps wrong querry.' );
assert.areSame( 1, autocomplete.model.data.length, 'Emoji result contains more than one result.' );
assert.areSame( ':collision', autocomplete.model.query, 'Model keeps wrong query' );
assert.areSame( 1, autocomplete.model.data.length, 'Emoji result contains more than one result' );
objectAssert.areEqual( { id: ':collision:', symbol: '💥' }, autocomplete.model.data[ 0 ], 'Emoji result contains wrong result' );
} );
}
Expand Down
4 changes: 2 additions & 2 deletions tests/plugins/emoji/manual/repeated.html
@@ -1,8 +1,8 @@
<h2>Classic editor</h2>
<div id="classic"></div>

<h2>Inline editor</h2>
<div id="inline" contenteditable="true">
</div>
<div id="inline" contenteditable="true"></div>

<script>
CKEDITOR.replace( 'classic' );
Expand Down

0 comments on commit 2850ae1

Please sign in to comment.