Skip to content

Commit

Permalink
use element.classList
Browse files Browse the repository at this point in the history
  • Loading branch information
bantic committed Aug 4, 2015
1 parent 8ded94f commit 75940ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit/editor/editor-test.js
Expand Up @@ -42,7 +42,7 @@ test('creating an editor adds EDITOR_ELEMENT_CLASS_NAME if not there', (assert)
editorElement.className = 'abc def';

var editor = new Editor(document.getElementById('editor1'));
const hasClass = (className) => editor.element.className.indexOf(className) !== -1;
const hasClass = (className) => editor.element.classList.contains(className);
assert.ok(hasClass(EDITOR_ELEMENT_CLASS_NAME), 'has editor el class name');
assert.ok(hasClass('abc') && hasClass('def'), 'preserves existing class names');
});
Expand Down

0 comments on commit 75940ff

Please sign in to comment.